Make WordPress cache permanent for some pages until edited

In reality it is very hard to know when a page is affected by an edit. A page contains footer, memus, widgets, shorcodes and meta data which might change “globaly”. Having a general detection which page is affected by any such change is bordering the impossible.

Cache expiration in general is just a very hard thing to do optimally, and setting an interval until it should happen is just a si,ple compromise between the need to have cache and the inability to have a good expiration policy.

In the real world, it does not even matter much for how long you are caching your pages and even a duration as low as 5 minutes can be good enough, as for most sites most pages are just not being accessed more than once in a while.

The real caching strategy for which it is easier to detect information expiry and which actually reduces load on your server is object caching. Getting this to work right is much more important than page caching.