Problem/Motivation
Views cache plugins configure caching for different types of data, including cached results and rendered output. The effect of cacheSetMaxAge() depends on the cache type. In particular, cacheSetMaxAge('results') controls the max-age of cached query results, whereas cacheSetMaxAge('output') can affect the rendered view’s max-age. The current documentation does not clearly explain this distinction, how cache tags are used, or which cache types are supported.
Steps to reproduce
Proposed resolution
Clarify the documentation in CachePluginBase to explain the distinction between the results and output cache types, document how cache tags are used, and identify the currently supported cache type.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3631718
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
Comment #2
leandro713 commentedI’d like to work on clarifying the Views cache plugin behavior in CachePluginBase documentation.
Comment #3
joachim commentedComment #5
leandro713 commentedClarified the Views cache documentation to distinguish result-cache expiration from the rendered view’s max-age. Also clarified cache-tag usage and the currently supported cache type. The relevant tests, PHP syntax check and PHPCS pass.
Comment #6
ishfaqafridi85 commentedOne small clarification:
Time::getDefaultCacheMaxAge()also usescacheSetMaxAge('output'). Please make the new comment specific tocacheSetMaxAge('results').disclosure: tested with the help of an LLM.
Comment #7
leandro713 commentedI’ve identified the issue in the comment for
cacheSetMaxAge():it describes the behaviour too broadly, even thoughgetDefaultCacheMaxAge()also callscacheSetMaxAge('output'), which affects the rendered view’s max-age. I’ll update the documentation to make clear that the statement applies specifically tocacheSetMaxAge('results').Comment #8
leandro713 commentedComment #9
smustgrave commentedLets update the summary with what you're targeting please.
Comment #10
leandro713 commentedComment #11
leandro713 commentedHi, I’ve updated the issue summary to clarify the scope of the documentation changes, including the points addressed in the first MR push and the distinction between the
resultsandoutputcache types. Thanks for the feedback.Comment #12
leandro713 commentedComment #13
leandro713 commented