Skip to content

4.3.0 - Prevent in-memory storing when "Cache-Control: no-store" is used as request header

Choose a tag to compare

@stephanschuler stephanschuler released this 21 Feb 08:34
· 22 commits to main since this release
4e62857

Feature:

The request mechanism now prevents the "request cache" (as described
in the next section below) to be used at all.

Just add the HTTP request header "Cache-Control: no-store" to the
request.

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.