From 142515d864e523a136ad35a0938af1dc34e1c140 Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Tue, 5 Nov 2024 00:25:44 +0800 Subject: [PATCH] perf: tweak LogEventsCache size and TTL --- lib/logflare/logs/log_events_cache.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logflare/logs/log_events_cache.ex b/lib/logflare/logs/log_events_cache.ex index 6fdaa5484..2dae44274 100644 --- a/lib/logflare/logs/log_events_cache.ex +++ b/lib/logflare/logs/log_events_cache.ex @@ -4,7 +4,7 @@ defmodule Logflare.Logs.LogEvents.Cache do alias Logflare.Logs.LogEvents alias Logflare.ContextCache alias Logflare.LogEvent, as: LE - @ttl :timer.hours(1) + @ttl :timer.minutes(15) @cache __MODULE__ @@ -19,7 +19,7 @@ defmodule Logflare.Logs.LogEvents.Cache do :start_link, [ @cache, - [expiration: expiration(default: @ttl), limit: limit(size: 5_000), stats: stats] + [expiration: expiration(default: @ttl), limit: limit(size: 2_500), stats: stats] ] } }