Commit 535f77a
committed
Add HTTP caching feature (RFC 7234)
Implement a new :caching feature that stores and reuses HTTP responses
according to RFC 7234 freshness and validation semantics. Only GET and
HEAD responses are cached. Supports Cache-Control (max-age, no-cache,
no-store), Expires, ETag / If-None-Match, and Last-Modified /
If-Modified-Since for freshness checks and conditional revalidation.
Ships with a default in-memory store. Custom stores can be passed via
the store option.
Closes #223.1 parent 2a1e5b3 commit 535f77a
8 files changed
Lines changed: 1485 additions & 0 deletions
File tree
- lib/http
- features
- sig
- test/http/features
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
0 commit comments