Fixed place cache check.

This commit is contained in:
DebaucheryLibrarian 2023-08-03 00:31:07 +02:00
parent ce41e24434
commit 5f2c9eb5df
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ async function resolvePlace(query) {
const cacheKey = `place-${slugify(query)}`; const cacheKey = `place-${slugify(query)}`;
const cachedPlace = await redis.hGetAll(cacheKey); 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); await redis.expire(cacheKey, 3600 * 24 * 30);
logger.debug(`Using cached place '${cacheKey}' for query '${query}': ${JSON.stringify(cachedPlace)}`); logger.debug(`Using cached place '${cacheKey}' for query '${query}': ${JSON.stringify(cachedPlace)}`);