>
with a simpler cache model (say you just cache a single item), do you agree that solving the "when" problem is very managable?The "when" problem is dependent on your application architecture, not on your cache backend nor the number of keys in it.
If, overall, you have an extremely simplistic application architecture, then cache invalidation may be quite easy, but you'll either:
1. forgo advanced user interaction or dynamic updates, in which case cache invalidation may not even be required at all (excepting publishing)
2. have scalability problems, and need to increase the complexity of your application to meet those challenges
The difficulty of cache invalidation scales with the complexity of your application (and not necessarily linear scaling)
> My argument is that #1 can be very managable with simpler data models. #2 can't be avoided; and #2 is very hard.
Yes, #1 can be manageable for low-traffic simple static applications. It is a general problem who's difficulty relates to the complexity of the application.
Yes, #2, can't be avoided. But, while it is interesting, and - in some cases, given a specific caching stack - it may be relatively hard, it's not a general problem. Difficulties with it are implementation-specific, not broadly applicable. Significantly, it's not the general and fundamental hard problem being referred when people talk about the universal difficulty of "cache invalidation".