On Apr 16, 11:43 am, Chris Peterson <[email protected]> wrote: > Are there documented best practices for setting expiration times for > cached items? > > I'm also curious about the distribution of expiration times used by > large users of memcached. Are there any metrics for the common > percentages of cached items: > > * with no expiration time? > * expiring within seconds? > * expiring within minutes? > * expiring within hours? > * expiring within days?
It depends on your needs. For a normal item cache situation, it seems that anything other than 0 is just a lack of confidence in your invalidation logic or perhaps a hint that something is no longer interesting after a particular point in time so the server may as well get rid of it sooner if it has the opportunity.
