Skip to content

Commit

Permalink
update caching to reduce memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
loukylor committed Nov 9, 2024
1 parent 0370b5e commit c3647aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions TrickfireCheckIn/Discord/Bot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ public Bot(string token)
{
DiscordClientBuilder builder = DiscordClientBuilder
.CreateDefault(token, DiscordIntents.AllUnprivileged)
.ConfigureExtraFeatures((conf) =>
{
conf.AbsoluteMessageCacheExpiration = TimeSpan.FromMinutes(5);
conf.SlidingMessageCacheExpiration = TimeSpan.FromMinutes(1);
conf.AlwaysCacheMembers = false;
})
.UseCommands((_, extension) =>
{
// Configure to slash commands
Expand Down

0 comments on commit c3647aa

Please sign in to comment.