Use negative_ttl for render cache/url cache context on 404s

Created on 27 April 2016, over 8 years ago
Updated 15 January 2025, 7 days ago

Problem/Motivation

Follow-up from #2699613: Set a shorter TTL for 404 responses in page_cache module .

We've added negative_ttl there, but so far only using it for the page cache.

There are two ways we could apply this:

1. Apply it indiscriminately to any cache item on a 404. This means something that's the same on non-404 pages would get cached for an unnecessarily short time though.

2. Apply it as cacheable metadata for the URL cache context, only on 404s, this would have mitigated #2699627: url.path cache context for breadcrumbs is unnecessarily granular . The advantage of this is the per-url cache context definitely determines reliably between being on a 404 or not.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Closed: won't fix

Version

11.0 🔥

Component

render system

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
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.

  • 🇬🇧United Kingdom catch

    Don't think this makes sense, the contents of 404 pages are usually pretty cacheable, unless you're using search_404 or something but that can set its own max-age.

Production build 0.71.5 2024