Skip to content

Commit

Permalink
try: print found caches
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Dec 11, 2023
1 parent 2ab930c commit c6b79bf
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/utils/purge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ async function purgeByTime({
`
);

const cachesFound = await utils.getCachesByKeys(prefixes);

utils.info(`${JSON.stringify(cachesFound)}`);

caches = filterCachesByTime({
caches: await utils.getCachesByKeys(prefixes),
caches: cachesFound,
doUseLastAccessedTime,
maxDate
});
Expand All @@ -86,8 +90,12 @@ async function purgeByTime({
}", and having the key "${primaryKey}".`
);

const cachesFound = await utils.getCachesByKeys([primaryKey]);

utils.info(`${JSON.stringify(cachesFound)}`);

caches = filterCachesByTime({
caches: await utils.getCachesByKeys([primaryKey]),
caches: cachesFound,
doUseLastAccessedTime,
maxDate
}).filter(x => utils.isExactKeyMatch(primaryKey, x.key));
Expand Down

0 comments on commit c6b79bf

Please sign in to comment.