Problem/Motivation

The plugin currently provides tag-based invalidation only. In some use cases this is insufficient/not optimal.

Steps to reproduce

Proposed resolution

Extend the plugin to optionally support time-based invalidation, mostly merging with logic in \Drupal\views\Plugin\views\cache\Time, while preserving the existing custom-tag behavior.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

primsi created an issue. See original summary.

primsi’s picture

This is WIP. I must be missing something, because `max-age` still doesn't change even though I see the correct value if debugging `getDefaultCacheMaxAge`.

berdir’s picture

Status: Active » Needs work

reviewed.

berdir’s picture

Status: Needs work » Needs review

Spent more time than expected looking into this, but fundamentally, the issue had nothing to do with Drupal 10 and 11 and it shouldn't have worked on any version.

The main issue was the schema which used type int, which cast custom to 0, and then once saved, the expression feature stopped working and max-age was 0. I changed it to string instead, which is quite messy, separate keys might be better, but it works.

Various test cleanups and did real testing with this as well.

  • berdir committed 5f2c5814 on 8.x-1.x authored by primsi
    feat: #3572609 Add optional time-based invalidation
    
    By: primsi
    By:...
berdir’s picture

Status: Needs review » Fixed

Merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.