From 071f2994081dd16ebaf4f707b942279857e8c3d4 Mon Sep 17 00:00:00 2001 From: "Fabien \"egg\" O'Carroll" Date: Wed, 31 Jan 2024 16:59:49 +0700 Subject: [PATCH] Moved get logic into private method --- ghost/adapter-cache-redis/lib/AdapterCacheRedis.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ghost/adapter-cache-redis/lib/AdapterCacheRedis.js b/ghost/adapter-cache-redis/lib/AdapterCacheRedis.js index 1000f3e460..18bb4bb093 100644 --- a/ghost/adapter-cache-redis/lib/AdapterCacheRedis.js +++ b/ghost/adapter-cache-redis/lib/AdapterCacheRedis.js @@ -211,6 +211,10 @@ class AdapterCacheRedis extends BaseCacheAdapter { * @param {() => Promise} [fetchData] An optional function to fetch the data, which will be used in the case of a cache MISS or a background refresh */ async get(key, fetchData) { + return this.#get(key, fetchData); + } + + async #get(key, fetchData) { const internalKey = this._buildKey(key); try { const result = await this._get(internalKey);