Skip to content
Snippets Groups Projects
Commit 63f062b1 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

refactor: better debug cached pagination

parent 6e494d11
No related branches found
No related tags found
No related merge requests found
...@@ -48,11 +48,14 @@ async function get(path, options, retries = 5) { ...@@ -48,11 +48,14 @@ async function get(path, options, retries = 5) {
try { try {
const cacheResult = await renovateCache.get(cacheNamespace, path); const cacheResult = await renovateCache.get(cacheNamespace, path);
if (cacheResult.etag === etag) { if (cacheResult.etag === etag) {
logger.trace({ path }, 'Returning cached paginated result'); logger.debug({ path }, 'Returning cached paginated result');
res.body = cacheResult.body; res.body = cacheResult.body;
return res; return res;
} }
logger.trace({ path }, 'Outdated pagination cache'); logger.debug(
{ oldEtag: cacheResult.etag, newEtag: etag, path },
'Outdated pagination cache'
);
} catch (err) { } catch (err) {
logger.trace({ path }, 'Paginated cache miss'); logger.trace({ path }, 'Paginated cache miss');
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment