tusharf5/runtime-memcache

Evict cached item based on its size

pocorall opened this issue · 2 comments

I'm very busy nowadays but I'll work on this during the next couple of weekends :)

I would like to know what type of size based eviction policy would make sense in this case.

  1. Size of number of keys (which is already there)
  2. Actual size of objects (in bytes) stored in the cache.

As the javascript cannot measure exact size of the object in bytes, we may specify size of the item when we put it into the cache.