Skip to content

A set of extensions to provide caching support on mediator based request handlers.

License

Notifications You must be signed in to change notification settings

dataneek/cacheable

Repository files navigation

cacheable

Build status NuGet NuGet CodeFactor

A set of extensions to provide caching support on MediatR based request handlers.

something

Installing Cacheable

You should install Cacheable with NuGet:

Install-Package Cacheable

This command will download and install Cacheable. Let me know if you have questions!

Using Cacheable

Cacheable requires MediatR and your IoC container of choice. The decorator pattern is used to wrap the IRequestHandler and IAsyncRequestHandler classes with Cacheable implementations that will handle the caching.

With StructureMap

For(typeof(IRequestHandler<,>)).DecorateAllWith(typeof(MemoryCacheRequestHandler<,>));
For(typeof(IAsyncRequestHandler<,>)).DecorateAllWith(typeof(MemoryCacheAsyncRequestHandler<,>));

About

A set of extensions to provide caching support on mediator based request handlers.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published