Hot answers tagged

3 votes
Accepted

How do you deal with random class and cache?

One workaround to problems like this is using string placeholders. The basic idea is that instead of rendering the actual dynamic value inside {% cache %} tags, you can output a static string ...
3 votes

How do you deal with random class and cache?

Randomness and caching are always gonna be at odds. Before you jump at complicated solutions, I'd have a talk about precise requirements, including mentioning the trade-offs involved. Do you really ...
  • 6,970
3 votes

Recommended caches to clear after server deployments?

I recommend clearing all caches on deploy via clear-caches/all. Caches should not be used to mask performance issues, they are used to solve concurrency & scaling, by holding onto data that doesn'...
  • 11.1k
2 votes

Recommended caches to clear after server deployments?

This is a complicated question, because... it depends :) Clearing all the caches is often cited as a good practice, because it completely avoids any potential problems due to stale data, during or ...
2 votes
Accepted

Disable template cache globally based on condition

I can't think of a different way to conditionally enable template caching (globally, i.e. not per {% cache %} tag) other than to conditionally set the enableTemplateCaching config setting to either ...

Only top scored, non community-wiki answers of a minimum length are eligible