Support min-age in render caching

Created on 2 June 2015, over 9 years ago
Updated 30 January 2023, almost 2 years ago

Problem/Motivation

All the new render cacheing API is nice, but there is a full level of usecases where you want to ensure that a cache entry is not constantly invalidated.

Views expose that information via time based caching.

Proposed resolution

Discussed with plach at the airport:

For 3. we will need a #cache_minage property (that does not bubble and hence is not within #cache), which controls that the RenderCache service should set that special flag for retrieving the cache, so that invalid / expired items are returned.

Will likely need some more thought as we do not want to call the cache plugin at all, but determine on cache retrieval, so we probably should be setting that always and then check if that property is present in the retrieved render array.ΓΉ

If it is set and invalid, we compare the timestamp of the minage with the actual age timestamp, else we return a cache miss.

--

- None plugin should just set max-age 0 and we are done.

- Tag based output kinda does nothing on itself. (what we already do in core except that we remove the old and now due to bubbling broken output cache support)

Based upon that we need to figure out the proper details.

Remaining tasks

User interface changes

API changes

πŸ“Œ Task
Status

Needs work

Version

9.5

Component
RenderΒ  β†’

Last updated 3 days ago

Created by

πŸ‡©πŸ‡ͺGermany dawehner

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

    Related to the Views in Drupal Core initiative.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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.

  • The Needs Review Queue Bot β†’ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

Production build 0.71.5 2024