Skip to content

Conversation

@deviantintegral
Copy link

By default, Drupal will clear CACHE_TEMPORARY on cron. However, this
means that at best, your cache expiry for the page cache can be no
smaller than your cron interval. Some site might set cron to run once
every 30 or 60 minutes, when they might have other data that they want
to keep fresh on the page.

By setting the expiry to be equal to the cache lifetime, we ensure that
cache_get() will return FALSE if the object is truly expired.

This is an implementation of https://drupal.org/node/1279654#comment-6473782

By default, Drupal will clear CACHE_TEMPORARY on cron. However, this
means that at best, your cache expiry for the page cache can be no
smaller than your cron interval. Some site might set cron to run once
every 30 or 60 minutes, when they might have other data that they want
to keep fresh on the page.

By setting the expiry to be equal to the cache lifetime, we ensure that
cache_get() will return FALSE if the object is truly expired.

This is an implementation of https://drupal.org/node/1279654#comment-6473782
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.

1 participant