in reply to Improving efficiency - repeated script hits at small interval

There are two ways to deal with cache consistency: time-to-live, and invalidation. In an invalidation system, the source of the data has to notify your cache when it makes changes. This can work well if you don't make changes very often. In a time-to-live system, you just return the cached data for a specified amount of time and ignore possible changes until then. If you need very up-to-date data and it changes frequently, you may not be able to use caching.
  • Comment on Re: Improving efficiency - repeated script hits at small interval