diff --git a/src/lib/cache/http.ts b/src/lib/cache/http.ts index 1cfc67ed2..145ae78de 100644 --- a/src/lib/cache/http.ts +++ b/src/lib/cache/http.ts @@ -26,9 +26,12 @@ export function parseCacheResponse(response: Response): { const cacheControlHeader = response.headers.get('cache-control'); const cacheControl = cacheControlHeader ? parseCacheControl(cacheControlHeader) : null; + const cacheTagHeader = response.headers.get('x-gitbook-cache-tag'); + const tags = !cacheTagHeader ? [] : cacheTagHeader.split(','); + const entry = { ttl: 60 * 60 * 24, - tags: [], + tags, }; if (cacheControl && cacheControl['max-age']) {