mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
Removed caching
This commit is contained in:
@ -18,10 +18,7 @@ using Bit.Core.Repositories;
|
||||
using Bit.Core.Services;
|
||||
using Repos = Bit.Core.Repositories.SqlServer;
|
||||
using System.Text;
|
||||
using StackExchange.Redis.Extensions.Core;
|
||||
using StackExchange.Redis.Extensions.Newtonsoft;
|
||||
using Loggr.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using System.Linq;
|
||||
using Microsoft.AspNetCore.Mvc.Formatters;
|
||||
using Microsoft.Net.Http.Headers;
|
||||
@ -62,16 +59,6 @@ namespace Bit.Api
|
||||
ConfigurationBinder.Bind(Configuration.GetSection("GlobalSettings"), globalSettings);
|
||||
services.AddSingleton(s => globalSettings);
|
||||
|
||||
// Caching
|
||||
ISerializer serializer = new NewtonsoftSerializer(new JsonSerializerSettings
|
||||
{
|
||||
NullValueHandling = NullValueHandling.Ignore
|
||||
});
|
||||
services.AddSingleton(s => serializer);
|
||||
ICacheClient cacheClient = new StackExchangeRedisCacheClient(serializer,
|
||||
globalSettings.Cache.ConnectionString, globalSettings.Cache.Database);
|
||||
services.AddSingleton(s => cacheClient);
|
||||
|
||||
// Repositories
|
||||
services.AddSingleton<IUserRepository, Repos.UserRepository>();
|
||||
services.AddSingleton<ICipherRepository, Repos.CipherRepository>();
|
||||
|
@ -14,10 +14,6 @@
|
||||
"logKey": "SECRET",
|
||||
"apiKey": "SECRET"
|
||||
},
|
||||
"cache": {
|
||||
"connectionString": "SECRET.COM:6380,password=SECRET,ssl=True,abortConnect=False",
|
||||
"database": 0
|
||||
},
|
||||
"push": {
|
||||
"apnsCertificateThumbprint": "SECRET",
|
||||
"apnsCertificatePassword": "SECRET",
|
||||
|
Reference in New Issue
Block a user