Fixed place cache check.
This commit is contained in:
@@ -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)}`);
|
||||
|
||||
Reference in New Issue
Block a user