REQUEST - Caching
Our caching provider is built on top of Microsoft.Extensions.Caching.Memory Caching is insanely easy with request handlers in Shiny Mediator.
-
Create your request handler - you can mark Cache here with the attribute or you can use Configuration.
-
In your host startup, with the AddShinyMediator call, add the following:
There are many additional properties you can use to interact with the cache setup
Deeper Cache Control
You can add the ICacheControl to your contract to control cache directly at the point of call.
ForceRefresh allows an easy way to bypass cache and SetEntry allows you to set cache entry properties.
Configuration
We recommend configuring cache through Microsoft.Extensions.Configuration. Read Configuration for more information.