This pattern does provide for background refreshing and
updating of the cache. This is done through the CacheItemRemovedCallback. Here
is how it works. If your cache item was requested one time from the cache (as
in to populate it) then when the expiration time comes, the cache item expires
based upon the rules that the developer set. If there is subsequent access from
the cache item, that information is recorded. When it comes time to expire, it
places the original data back into the cache with a CachePriority.Low and a
short time to keep it in the cache. After that, a delegate is added to
System.Threading.ThreadPool.QueueUserWorkItem so that the data may be refreshed
on a background thread. Since all of the details to refresh each item in cache
are stored, all that is needed for discovery is the cache key. For explicit
details on this implementation, see TCache.ItemRemovedCallback in the
CacheExtension project.