Merge pull request 'Additional redis configs' (#16) from endpoints into main
Reviewed-on: #16
This commit was merged in pull request #16.
This commit is contained in:
@@ -25,12 +25,16 @@ public static class General
|
|||||||
services.Decorate<IIdentityService, IdentityCacheService>();
|
services.Decorate<IIdentityService, IdentityCacheService>();
|
||||||
|
|
||||||
services.AddStackExchangeRedisCache(options =>
|
services.AddStackExchangeRedisCache(options =>
|
||||||
options.Configuration = configuration.GetConnectionString("Redis"));
|
{
|
||||||
|
options.Configuration = configuration.GetConnectionString("Redis");
|
||||||
|
options.ConfigurationOptions!.ClientName = "PFM-API";
|
||||||
|
options.InstanceName = "PFM-API_";
|
||||||
|
});
|
||||||
|
|
||||||
services.AddHybridCache(options => options.DefaultEntryOptions = new HybridCacheEntryOptions
|
services.AddHybridCache(options => options.DefaultEntryOptions = new HybridCacheEntryOptions
|
||||||
{
|
{
|
||||||
Expiration = TimeSpan.FromMinutes(2),
|
Expiration = TimeSpan.FromMinutes(2),
|
||||||
LocalCacheExpiration = TimeSpan.FromMinutes(1)
|
LocalCacheExpiration = TimeSpan.FromMinutes(30)
|
||||||
});
|
});
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
|
|||||||
Reference in New Issue
Block a user