/
TODO
42 lines (39 loc) · 1.96 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## 0.3
- BUG: HEAD request on invalid entry caches zero-length response
- BUG: meta store hits but entity misses
- BUG: Response body written to cache each time validation succeeds
(actually, I'm not positive whether this is happening or not but
it looks like it is).
- Are we doing HEAD properly?
- liberal, conservative, sane caching configs
- Sample app
- busters.rb doc and tests
- no-cache.rb doc and tests
- Canonicalized URL for cache key:
- sorts params by key, then value
- urlencodes /[^ A-Za-z0-9_.-]/ host, path, and param key/value
- Support server-specific X-Sendfile (or similar) for delivering cached
bodies (file entity stores only).
- Sqlite3 (meta store)
- Cache invalidation on PUT, POST, DELETE.
- Invalidate at the request URI; or, anything that's "near" the request URI.
- Invalidate at the URI of the Location or Content-Location response header.
## Backlog
- Purge/invalidate specific cache entries
- Purge/invalidate everything
- Maximum size of cached entity
- Last-Modified factor: requests that have a Last-Modified header but no Expires
header have a TTL assigned based on the last modified age of the response:
TTL = (Age * Factor), or, 1h = (10h * 0.1)
- I wonder if it would be possible to run in threaded mode but with an
option to lock before making requests to the backend. The idea is to be
able to serve requests from cache in separate threads. This should
probably be implemented as a separate middleware component.
- stale-while-revalidate
- Serve cached copies when down (see: stale-if-error) - e.g., database
connection drops and the cache takes over what it can.
- When a cache misses due to Vary, try to validate using the best match. Note
that you can't do this with a weak validator, so only strong etags can be
used.
- Consider implementing ESI (http://www.w3.org/TR/esi-lang). This should
probably be implemented as a separate middleware component.