diff --git a/src/utils/resolve-place.js b/src/utils/resolve-place.js index ee788a03..7aa23b64 100755 --- a/src/utils/resolve-place.js +++ b/src/utils/resolve-place.js @@ -17,7 +17,7 @@ async function resolvePlace(query) { const cacheKey = `place-${slugify(query)}`; const cachedPlace = await redis.hGetAll(cacheKey); - if (cachedPlace && argv.placeCache !== false) { + if (argv.placeCache !== false && await redis.exists(cacheKey)) { await redis.expire(cacheKey, 3600 * 24 * 30); logger.debug(`Using cached place '${cacheKey}' for query '${query}': ${JSON.stringify(cachedPlace)}`);