Skip to content
Anthony J edited this page Jul 18, 2023 · 2 revisions

Cache Infrastructure

The cache infrastructure provided is simple to use, powerful, and flexible. We use interfaces for flexibility, and rich types to create themselves in an opinionated way that makes querying and setting cache the right way. With this library, you won't need to worry about null, we handle all that for you by using factory patterns for creating these objects.

Getting Started

First, we mark a value, service, entity, etc. as being cachable via the ICachable interface which provides a mechanism for retrieving a CacheKey for that instance. This also gives you the opportunity to define how to create a CacheKey for this particular instance.

    public class Animal : ICachable { ... }

Here's an example of just

    public class Animal : ICachable { ... }

Clone this wiki locally