mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 14:27:54 +00:00
Cache account lookup in memory when proxying
This commit is contained in:
parent
5aa47278cb
commit
423d23faf7
5 changed files with 96 additions and 18 deletions
|
|
@ -106,6 +106,7 @@ namespace PluralKit.Bot
|
|||
.AddTransient<LogChannelService>()
|
||||
.AddTransient<DataFileService>()
|
||||
|
||||
.AddSingleton<ProxyCacheService>()
|
||||
.AddSingleton<WebhookCacheService>()
|
||||
|
||||
.AddTransient<SystemStore>()
|
||||
|
|
@ -130,6 +131,8 @@ namespace PluralKit.Bot
|
|||
.AddSingleton(svc => new LoggerProvider(svc.GetRequiredService<CoreConfig>(), "bot"))
|
||||
.AddScoped(svc => svc.GetRequiredService<LoggerProvider>().RootLogger.ForContext("EventId", svc.GetRequiredService<EventIdProvider>().EventId))
|
||||
|
||||
.AddMemoryCache()
|
||||
|
||||
.BuildServiceProvider();
|
||||
}
|
||||
class Bot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue