memcached - Is it important to give expiry time for memcache -


i have web application perform if database operations cached. static data's , new data added everyday. reduce database read operation i'll using memcached.

what happen if don't give expiry time data put in memcached. affect performance consuming more ram..? ditch expiry time while adding data cache.

ps: use aws deploy webapp ngnix, php, mysql.

presumably when app still running in year 2050, things put in cache way in 2012 no longer relevant. if don't provide sort of expiration, cache reset (e.g. server restart) end flushing cache.

unless have infinite memory (and i'm pretty sure aws doesn't provide ;-) wise add expiration time cached items.

even though memcached expire items based on least used mechanism (thanks @mikewied pointing out), cache still fill entirely before memcache begins evicting items based on lru. unfortunately, memcache's lru algorithm per slab, not global. means lru-based evictions can less optimal. see memcached memory allocation , optimization.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -