开发者

wanting a good memory + disk caching solution

开发者 https://www.devze.com 2022-12-21 10:16 出处:网络
I\'m currently storing generated HTML pages in a memcached in-memory cache. This works great, however I am wanting to increase the storage capacity of the cache beyond available memory. What I would r

I'm currently storing generated HTML pages in a memcached in-memory cache. This works great, however I am wanting to increase the storage capacity of the cache beyond available memory. What I would really like is:

  1. memcached semantics (i.e. not reliable, just a cache)
  2. memcached api preferred (but not required)
  3. large in-memory first level ca开发者_运维问答che (MRU)
  4. huge on-disk second level cache (main)
  5. evicted from on-disk cache at maximum storage using LRU or LFU
  6. proven implementation

In searching for a solution I've found the following solutions but they all miss my marks in some way. Does anyone know of either:

  • other options that I haven't considered
  • a way to make memcachedb do evictions

Already considered are:

memcachedb

  • best fit but doesn't do evictions: explicitly "not a cache"
  • can't see any way to do evictions (either manual or automatic)

tugela cache

  • abandoned, no support
  • don't want to recommend it to customers

nmdb

  • doesn't use memcache api
  • new and unproven
  • don't want to recommend it to customers


Tokyo Cabinet/Tokyo Tyrant?


Seems that later versions of memcachedb can be cleaned up manually if desired using the rget command and storing the expiry time in the data record. Of course, this means that I pound both the server and network with requests for the entire data block even though I only want the expiry time. Not the best solution but seemingly the only one currently available.


I worked with EhCache and it works very good. It has in memory cache and disk storage with differents eviction policies. It's a mature library a with good support. There is a memcached api that wraps EhCache, specially developed for GAE support.

Regards, Jonathan.

0

精彩评论

暂无评论...
验证码 换一张
取 消