From edc70104188bdbef6493437d91c5620c4d93f734 Mon Sep 17 00:00:00 2001 From: Daan <> Date: Fri, 11 Oct 2024 15:15:47 +0200 Subject: [PATCH] PR feedback: remove cache.delete function --- lib/cache.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/cache.js b/lib/cache.js index 255e1d06..5c7019eb 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -20,7 +20,7 @@ class MemoryCache { if (cached.expiresAt > Date.now() || cached.expiresAt === 0) { return cached.value; } - this.delete(key); + this.cache.delete(key); } return undefined; } @@ -44,15 +44,6 @@ class MemoryCache { }); } - /** - * Deletes cache entry for key - * @param {string} key Cache key - * @return {void} - */ - delete (key) { - this.cache.delete(key); - } - /** * Clear cache * @returns {void}