You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,7 @@ const options = {
61
61
cacheHeuristic:0.1,
62
62
immutableMinTimeToLive:24*3600*1000, // 24h
63
63
ignoreCargoCult:false,
64
+
trustServerDate:true,
64
65
};
65
66
```
66
67
@@ -72,6 +73,8 @@ If `options.shared` is `true` (default), then the response is evaluated from a p
72
73
73
74
If `options.ignoreCargoCult` is true, common anti-cache directives will be completely ignored if the non-standard `pre-check` and `post-check` directives are present. These two useless directives are most commonly found in bad StackOverflow answers and PHP's "session limiter" defaults.
74
75
76
+
If `options.trustServerDate` is false, then server's `Date` header won't be used as the base for `max-age`. This is against the RFC, but it's useful if you want to cache responses with very short `max-age`, but your local clock is not exactly in sync with the server's.
77
+
75
78
### `storable()`
76
79
77
80
Returns `true` if the response can be stored in a cache. If it's `false` then you MUST NOT store either the request or the response.
0 commit comments