Browse Source

Check revalidated response is storable

revalidated-is-storable
Luke Childs 8 years ago
parent
commit
f1b05267fe
  1. 2
      README.md

2
README.md

@ -143,7 +143,9 @@ if (!oldPolicy.satisfiesWithoutRevalidation(newRequest)) {
const response = modified ? newResponse : oldResponse;
// Update the cache with the newer/fresher response
if (policy.storable()) {
letsPretendThisIsSomeCache.set(newRequest.url, {policy, response}, policy.timeToLive());
}
// And proceed returning cached response as usual
response.headers = policy.responseHeaders();

Loading…
Cancel
Save