From 59a92d03638ac0bf48e31a4b125b9eb2cc28b20b Mon Sep 17 00:00:00 2001 From: TKone7 Date: Mon, 23 Oct 2023 15:49:34 +0200 Subject: [PATCH 1/2] Fix cleanup logic Keep only cache entries with an expiry in the future. --- backend/src/api/memory-cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/memory-cache.ts b/backend/src/api/memory-cache.ts index fe4162420..e71aaa6a2 100644 --- a/backend/src/api/memory-cache.ts +++ b/backend/src/api/memory-cache.ts @@ -31,7 +31,7 @@ class MemoryCache { } private cleanup() { - this.cache = this.cache.filter((cache) => cache.expires < (new Date())); + this.cache = this.cache.filter((cache) => cache.expires > (new Date())); } } From 4ca273c8c18c753c97fa54fe4cb0d0c305c6d704 Mon Sep 17 00:00:00 2001 From: TKone7 Date: Mon, 23 Oct 2023 15:56:07 +0200 Subject: [PATCH 2/2] Agree to Contributor License Agreement --- contributors/TKone7.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 contributors/TKone7.txt diff --git a/contributors/TKone7.txt b/contributors/TKone7.txt new file mode 100644 index 000000000..0112e34a3 --- /dev/null +++ b/contributors/TKone7.txt @@ -0,0 +1,3 @@ +I hereby accept the terms of the Contributor License Agreement in the CONTRIBUTING.md file of the mempool/mempool git repository as of October 23, 2023. + +Signed: TKone7