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

keep application cache in sync with service bus

This commit is contained in:
Kyle Spearrin
2019-06-13 00:10:37 -04:00
parent 2d63732085
commit 6f0d64119a
16 changed files with 276 additions and 9 deletions

View File

@ -86,7 +86,16 @@ namespace Bit.Core.Utilities
services.AddSingleton<IPaymentService, StripePaymentService>();
services.AddSingleton<IMailService, HandlebarsMailService>();
services.AddSingleton<ILicensingService, LicensingService>();
services.AddSingleton<IApplicationCacheService, InMemoryApplicationCacheService>();
if(CoreHelpers.SettingHasValue(globalSettings.ServiceBus.ConnectionString) &&
CoreHelpers.SettingHasValue(globalSettings.ServiceBus.ApplicationCacheTopicName))
{
services.AddSingleton<IApplicationCacheService, InMemoryServiceBusApplicationCacheService>();
}
else
{
services.AddSingleton<IApplicationCacheService, InMemoryApplicationCacheService>();
}
if(CoreHelpers.SettingHasValue(globalSettings.Mail.SendGridApiKey))
{