Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't limit element cache by config cacheDuration #16796

Draft
wants to merge 4 commits into
base: 4.15
Choose a base branch
from

Conversation

timkelty
Copy link
Contributor

Description

Limiting the element cache duration by \craft\config\GeneralConfig::$cacheDuration (defaults to a 1 day) can result in element caches being set with unexpectedly short expiry.

It seems better and more flexible to just let it stopCollectingCacheInfo return a null duration, and leave it to the caller to limit the value if desired.

@brandonkelly brandonkelly changed the base branch from 4.x to 4.15 February 27, 2025 23:16
@mmikkel
Copy link
Contributor

mmikkel commented Feb 28, 2025

The way I'm reading this change, template caches created with {% cache %} and containing element queries will no longer default to expire as per the cacheDuration config setting?

If that's the case, this feels like a pretty major behavioural change IMO.

@timkelty timkelty marked this pull request as draft February 28, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants