Browse Source

Drop cacheKey concept

master
Kornel Lesiński 9 years ago
committed by Kornel Lesiński
parent
commit
3ab228b528
  1. 6
      README.md
  2. 4
      index.js
  3. 2
      package.json

6
README.md

@ -49,12 +49,6 @@ Returns `true` if the response is stale (i.e. not fresh).
It generally means the response can't be used any more without revalidation with the server. However, there are exceptions, e.g. client can explicitly allow stale responses. A fresh response still may not be used if other conditions—such as `Vary`—are not satisfied.
### `cacheKey()`
Returns a string that is a combination of method, URL, and headers selected with `Vary`.
Note that `Vary: *` never matches any request, so matching of cache keys alone is not sufficient to satisfy a request.
## Implemented
* `Expires` with check for bad clocks

4
index.js

@ -105,10 +105,6 @@ CachePolicy.prototype = {
return key;
},
cacheKey() {
return `${this._req.method || 'GET'} ${this._req.url || ''} ${this._varyKeyForRequest(this._req)}`;
},
/**
* Value of the Date response header or current time if Date was demed invalid
* @return timestamp

2
package.json

@ -1,6 +1,6 @@
{
"name": "http-cache-semantics",
"version": "2.0.0",
"version": "3.0.0",
"description": "Parses Cache-Control headers and friends",
"main": "index.js",
"repository": "https://github.com/pornel/http-cache-semantics.git",

Loading…
Cancel
Save