On Thu, Apr 16, 2009 at 22:20, Dustin <[email protected]> wrote:

>   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 [...]


What was that quote again? "There are only two things that are really hard
in software development: Naming things and cache invalidation". :-)

In our application, we tend to use 48 hours as the standard. We avoid using
0 not because of invalidation issues, but because we sometimes have bugs
that poison the cache and then we'd rather have the application fix itself
automatically by expiring broken items while we track down the actual bug.

There's also a few cases where we use a few hours as the expiry time. Those
are for things we want to cache, but where we don't really want to
invalidate the cached data every time the underlying data changes, usually
because invalidation would be frequent and costly with no real benefit. In
those cases it's ok to present somewhat old data.


/Henrik

Reply via email to