0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Moved get logic into private method

This commit is contained in:
Fabien "egg" O'Carroll 2024-01-31 16:59:49 +07:00 committed by Fabien O'Carroll
parent 9a62ee5e44
commit 071f299408

View file

@ -211,6 +211,10 @@ class AdapterCacheRedis extends BaseCacheAdapter {
* @param {() => Promise<any>} [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);