Library to use simple distributed caching.
- You need install docker in your machine to build in local, you can use in production just alter a configuration Instace in startup project.
docker run -d -p 6379:6379 -i -t redis:3.2.5-alpine
builder.Services.AddRedisCache(opt => { opt.InstanceName = "redis-cache"; opt.Configuration = "localhost:6379"; });
- After installing you can use the interface ICacheManager in your application. you can see below:
-
In this interface there are two methods
-
ExecuteCacheAsync - creates and retrieves information from the cache, you need to pass three parameters to class.
Params :
- key - parameter to pass the name of the key value that will be stored
- value - a lambda expression where the data you want to cache will run.
- TimeExpiration - parameter used to expire the stored cache, it is an ENUM, which is composed as follows:
- Another parameter is Get() - brings the key stored in the bank and its value.
Params:
- key - pass a key armazened and you have returned your value.
this project is growing, new features will be started, you can contribute.



