Quick Tangent: Am I the Crazy One?

While reading the documentation for REDIS, I came across an interesting bit about the EXPIRE command. Apparently, you can set an absolute time for a key to expire, and any request for an expired key will result in its expulsion from the cache. REDIS then uses an algorithm to help retire these keys by periodically polling a random set of 20 keys; this repeated probing assists with the general maintenance of the cache. All of this information leads me to conclude the following: you can’t set a key to expire after a certain period of being ignored (i.e., no user requests for the key). Perhaps I’m missing something…but don’t you want a configurable option to set an expiration time due to inactivity? So that you can keep your cache hit rate as high as possible? Or am I the crazy one?

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s