UNPKG

alcaeus

Version:

Hydra Core hypermedia-aware client library

17 lines (16 loc) 416 B
export const shouldLoad = () => true; export function requestCacheHeaders({ response }) { const etag = response.xhr.headers.get('ETag'); if (etag) { return { 'if-none-match': etag, }; } const lastModified = response.xhr.headers.get('Last-Modified'); if (lastModified) { return { 'if-modified-since': lastModified, }; } return {}; }