Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
views.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2026 at 14:28 UTC
Updated:
19 Mar 2026 at 09:20 UTC
Jump to comment: Most recent
View cache plugins have a get cacheExpire() method which seems to retroactively check the cache expiration based on cache->created.
Cache expiration is set on cache set, there's no need for any of this
Deprecate the method, stop calling it.
Found at least two implementations in contrib that use this, in metatag_views and search_api.
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
Comment #3
berdirIt's a minor thing but I was quite confused about this method while working on views_custom_cache_tag, why it exists and what the difference between this and \Drupal\views\Plugin\views\cache\CachePluginBase::cacheSetMaxAge() is.
Comment #4
lendudeChecked the Views D7 repo and yeah this is very much a remnant of D7 caching. Nice clean up.
Comment #9
catchCommitted/pushed to main and 11.x, thanks!