Fixed place cache check.
This commit is contained in:
parent
ce41e24434
commit
5f2c9eb5df
|
@ -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)}`);
|
||||
|
|
Loading…
Reference in New Issue