Usually when people talk about a topic being hard, they don’t mean the very constrained cases that are easy.
Usually when people talk about a topic being hard, they don’t mean the very constrained cases that are easy.
90% of the cases are easy cases, where thinking too hard about invalidation (as opposed to testing what works) is likely to give you worse performance.
There are a rare set of cases that are devilishly hard such as synchronizing the caches across an SMP microprocessor or making a system like Cloudflare really speed up your web site as opposed to slowing it down.
I'll second this. For example, I can usually get away with simple and short lived TTL caches in varnish (with grace) for high traffic read only APIs. Flushing (invalidation) is automated since it just expires. It doesn't always fit, but often it does.