Skip to content

Use no-cache header when max-age is zero#21

Merged
akrabat merged 1 commit intoslimphp:masterfrom
andybeak:abeak/allow_no_cache_header
Sep 20, 2017
Merged

Use no-cache header when max-age is zero#21
akrabat merged 1 commit intoslimphp:masterfrom
andybeak:abeak/allow_no_cache_header

Conversation

@andybeak
Copy link

You could previously accomplish this by doing something like this

$app->add(new \Slim\HttpCache\Cache('private, no-cache', 0, true));

But this results in a header like this: "private, no-cache, max-age=0, must-revalidate".

A neater header that is more standard is "private, no-cache" which will have the effect of stipulating that the cache MUST NOT use the response to satisfy a subsequent request without successful revalidation with the origin server.

@akrabat akrabat added this to the 0.4.0 milestone Sep 20, 2017
@akrabat akrabat merged commit 707d00d into slimphp:master Sep 20, 2017
akrabat added a commit that referenced this pull request Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants