Commit fb5d723
committed
feat: Prevent in-memory storing when "Cache-Control: no-store" is used as request header
Precondition 1:
There are two different caches: The request cache and the response cache.
The respones cache can utilize the response data, which allows for tagging
cache entries and hence fine grained retention calculation, so the request
cache can be used across different PHP processes and potentially across
different users.
The request cache can only utlize what's known before the request was
made. We usually use a transient memory cache for requests. This allows
a single PHP process to issue the same GET request multiple times without
needing to flush anything, because the cache content gets dropped as soon
as the PHP process is over.
Precondition 2:
Requests not only transport their URI but an array of request heraders
as well. Those request headers are meant to pass to the upstream server.
Usually, request headers are part of the response cache header, so
different request header values might cause cache misses e.g. for
basic auth.
Feature:
The request mechanism now prevents the "request cache" (as of
the second section above) to be used at all.1 parent 5e4cd5e commit fb5d723
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
256 | 258 | | |
257 | 259 | | |
258 | 260 | | |
| 261 | + | |
259 | 262 | | |
| 263 | + | |
| 264 | + | |
260 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
261 | 270 | | |
262 | 271 | | |
| 272 | + | |
263 | 273 | | |
264 | 274 | | |
265 | 275 | | |
| |||
269 | 279 | | |
270 | 280 | | |
271 | 281 | | |
272 | | - | |
273 | | - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
274 | 286 | | |
275 | 287 | | |
276 | 288 | | |
| |||
0 commit comments