Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/laget-se/laget.caching

A generic implementation for caching that supports application-, request- and session-caching...
https://github.com/laget-se/laget.caching

application-cache cache nuget request-cache session-cache

Last synced: 22 days ago
JSON representation

A generic implementation for caching that supports application-, request- and session-caching...

Awesome Lists containing this project

README

        

# laget.Caching
A generic implementation for caching that supports application-, request- and session-caching...

![Nuget](https://img.shields.io/nuget/v/laget.Caching)
![Nuget](https://img.shields.io/nuget/dt/laget.Caching)

## Configuration
> This implementation requires `Autofac` since this is the Inversion of Control container of our choosing.
### .NET Core
```c#
builder.RegisterCacheProviders();
```

### .NET Framework
```c#
var builder = new ContainerBuilder();
builder.RegisterCacheProviders();
var container = builder.Build();
```

## Usage
#### ApplicationCache (`IApplicationCache`)
> `Store`: Memory (MemoryCache)

Stores application-specific data, e.g application configuration that only change between deployments/releases.

#### RequestCache (`IRequestCache`)
> `Store`: Dictionary (ConcurrentDictionary)

Stores request-specific data, e.g. data used for a specific page that is fetched multiple times.