Abstract Cache

Intent

Provide a simple and abstracted means of caching expensive objects. Abstract the container used for holding any of the cached objects (this isolates the architecture from any specific cache container implementation). Place business rules for determining caching semantics (e.g., timeouts) in the objects being cached where they belong. Provide a standard means by which to build a cache and execute cacheable services.

Problem

Improving performance is usually never considered a bad thing. However, those attempts to improve the performance often end up compromising the design. These attempts include tasks such as denormalizing a database, adding complex thread logic, or using platform-specific caching techniques such as those ...

Get .NET Patterns: Architecture, Design, and Process now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.