1

I've always been unclear on this (it would be nice to include in the documentation). Let's say I use a cache tag like so:

{% cache for 1 hour %}

After an hour has passed, will the next user to load the page receive the cached version while the cache is being regenerated, or will they experience a slow page load while the cache is being regenerated?

1

will they experience a slow page load while the cache is being regenerated?

That one. After a cached item is expired, the next person to request that item will cause it to regenerate and take any performance penalty that involves.

2
  • Got it—thanks! Any way to change that behavior? I'd like to cache for shorter periods without users randomly experiencing slow page loads. Jun 8 at 0:13
  • At that point, you'll probably want to look into something like plugins.craftcms.com/blitz for caching and cache warming.
    – Brad Bell
    Jun 8 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.