寻找 FIFO/LRU 文件存储系统
我正在寻求实现一个基于磁盘的缓存系统。这个想法是分配一定量的磁盘空间并保存其中适合的数据,当空间不足时丢弃旧文件。
LRU 是我的首选删除策略,但我愿意接受 FIFO。当谷歌搜索缓存算法时,讨论似乎主要是基于内存的缓存。例如,Memcached 正是我正在寻找的,只不过它是基于内存的。另一方面,像 Memcachedb、couchdb 等解决方案似乎没有 LRU 功能。
我发现的最接近的是 squid 代理 服务器存储系统。 COSS 似乎是记录最多的一个,但要使用它我可能必须将其重写为独立的进程(或库)。
我可以使用什么项目或(java/python)库来做这样的事情?
编辑:发现这个相关问题。
I'm looking to implement a disk based caching system. The idea is to allocate a certain amount of disk space and save however much data fits in there, discarding of old files as I run out of space.
LRU is my first choice of deletion strategy, but I'm willing to settle for FIFO. When googling for cache algorithms, the discussion seems to be dominated by memory-based caching. Memcached, for example, would be exactly what I'm looking for, except that it's memory based. On the other hand, solutions like Memcachedb, couchdb etc. don't seem to have LRU capabilities.
The closest thing I've found is the squid proxy server storage systems. COSS seems to be the most documented one, but to use it I would probably have to rewrite it as a stand-alone process (or library).
What project or (java/python) library can I use for such a thing?
EDIT: found this related question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想所有内存缓存库都可以选择在磁盘上保留或扩展。至少,EHCache 是这样的。
因此,您只需配置一个缓存库以在磁盘上写入(因为您希望数据持久存在,或者将缓存大小扩展到内存限制之外)。
I guess all Memory caching library have an option to persist or expand on disk. At least, EHCache does.
So you can just configure a cache library to write on disk (either because you want the data to be persistant, or to expand the cache size over your memory limits).