Is there an option to configure a priority in memcached? (Similiar to Expiry)

Go To


A hashtable in memcached will be discarded either when it's Expired or when there's not enough memory and it's choosen to die based on the Least Recently Used algorithm.

Can we put a Priority to hint or influence the LRU algorithm? I want to use memcached to store Web Sessions so i can use the cheap round-robin.

I need to give Sessions Top Priority and nothing can kill them (not even if it's the Least Recently Used) except their own Max_Expiry.

2009-06-16 09:56
by NoName


Not that I know of. memcached is designed to be very fast and very straightforward, no fancy weights and priorities keep it simple.

You should not rely on memcache for persistent session storage. You should keep your sessions in the DB, but you can cache them in memcache. This way you can enjoy both worlds.

2009-07-15 09:13
by yhager