From ee952bcc91d0d076f5bc0749df499d81e55945f0 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Wed, 30 Apr 2025 13:26:52 -0700 Subject: [PATCH] Expire relay cache store after 1 minute Signed-off-by: Bryan Frimin --- apps/console/src/RelayEnvironment.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/console/src/RelayEnvironment.ts b/apps/console/src/RelayEnvironment.ts index 915b46ff3..aa9063173 100644 --- a/apps/console/src/RelayEnvironment.ts +++ b/apps/console/src/RelayEnvironment.ts @@ -108,9 +108,15 @@ const fetchRelay: FetchFunction = async ( }; function createRelayEnvironment() { + const source = new RecordSource(); + const store = new Store(source, { + queryCacheExpirationTime: 1 * 60 * 1000, + gcReleaseBufferSize: 20, + }); + return new Environment({ network: Network.create(fetchRelay), - store: new Store(new RecordSource()), + store, }); }