1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

Removed caching

This commit is contained in:
Kyle Spearrin
2016-07-30 16:37:52 -04:00
parent 4a8162d09a
commit f456a4fca8
6 changed files with 12 additions and 65 deletions

View File

@ -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>();

View File

@ -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",