KestrunHostSessionExtensions.AddDistributedMemoryCache method
Adds a default implementation of IDistributedCache that stores items in memory to the KestrunHost. Frameworks that require a distributed cache to work can safely add this dependency as part of their dependency list to ensure that there is at least one implementation available.
public static KestrunHost AddDistributedMemoryCache(this KestrunHost host,
MemoryDistributedCacheOptions? cfg)
| parameter | description |
|---|---|
| host | The KestrunHost to add services to. |
| cfg | The configuration options for the memory distributed cache. |
Return Value
The KestrunHost so that additional calls can be chained.
See Also
- class KestrunHost
- class KestrunHostSessionExtensions
- namespace Kestrun.Hosting