Home | Cache hits and misses | Cache item dependencies


Cache invalidation

Changes to your business or persistence models may impact the accuracy of related items held in cache. Items that become stale or "invalid" need to be evicted from the cache. The process of removing stale items from the cache is called invalidation. Note that caches generally support a number of types of invalidation mechanisms, such as rule based, time based and dependency based.

You will find that putting data objects into the cache is a fairly straightforward process. However, determining how to remove them, including managing the potentially complex web of dependencies held between related data components, will challenge most implementers. A solution architect needs to choose wisely which mechanism best fits; we discuss benefits and pitfalls later.

It is critical to understand how the various invalidation mechanisms work and the success of your caching project will be measured by how well you analyze, design, and implement your strategy. The general rule to follow is to invalidate as little as possible, without compromising the accuracy of requested data. This topic is covered in more detail in DynaCache invalidation.

+

Search Tips   |   Advanced Search