Cache Provider
Here we are some steps to be followed for implementing Cache Provider Library to your service.
Cache Provider is the *nuget package belongs to *http://cm.com and it is a part of Marketplace Development.This can be use for Implementing Redis Cache.
It consist of helping methods to Create, Get and Delete Cache.
Let' s Start:
Step 1:
Download Latest Version CM.Marketplace.Shared.Cachenuget package.
or
Run following command
nuget install CM.Marketplace.Shared.Cache -Version <Enter-Lates-Version> -Source https://proget2.sharedservices.cmgroep.local/nuget/CMFeed/
or
Install from the Package Manager Console within Visual Studio, run the following command:
Install-Package CM.Marketplace.Shared.Cache -Version <Enter-Lates-Version> -Source https://proget2.sharedservices.cmgroep.local/nuget/CMFeed/
**Note: **Make sure to download latest Release Version. Replace <Enter-Lates-Version> with Latest Version
Step 2:
In your appsettings.json add following lines in parent level:
"Cache": {
"RedisConfiguration": "REDIS_CONFIGURATION",
"RedisSlidingExpirationInMinutes": "TIME_IN_MINUTES",
"AppName":"YOUR_APP_NAME"
}
Step 3:
In your Program.cs file insert following line.
//---Service Rgistration----
builder.Services.AddCache(builder.Configuration);
All setup done ! Now it is time to implement !