Leverage symfony for HTTP revalidation

Created on 6 May 2014, over 10 years ago
Updated 9 September 2024, 3 months ago

Problem/Motivation

Follow-up from #2257709: Remove the interdependence between the internal page cache and management of the Cache-Control header for external caches .

(removed from the scope of this issue, there is no immediate need to address this here. Alternative approach: #2225765: Consider using cache tags (and cache contexts) for the ETag ).

Upon cache-revalidation the method used to check whether a 304 Not modified can be issued does not really conform to the spec according to @Wim Leers ( #2257709-5: Remove the interdependence between the internal page cache and management of the Cache-Control header for external caches ):

It is not required for both If-Modified-Since and If-None-Match to be specified to trigger a 304 response. If both an ETag and a Last-Modified response header are specified, then UAs SHOULD use both for HTTP revalidation, but it's not a requirement.

In fact the Symfony Response object already supports cache-revalidation out of the box via the isNotModified() method.

.

All problems have been addressed upstream.

Proposed resolution

Replace custom revalidation logic with Response::isNotModified().

Remaining tasks

User interface changes

API changes

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Cache 

Last updated about 19 hours ago

Created by

🇨🇭Switzerland znerol

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024