By default this plugin cache clears after 24 hours. This is done, I am guessing to clear out cache objects that have expired and are just hanging around. However, this will clear lots of valid caches as well.
Query caches are defined in a cache group. With a little tweak, query caches, could be setup with a say 24 hour cache expiry. Meaning, these groups would automatically invalidate themselves. Also with transient and site-transient automatically invalidating themselves, then all other caches, should remain until WordPress invalidates them.
By default this plugin cache clears after 24 hours. This is done, I am guessing to clear out cache objects that have expired and are just hanging around. However, this will clear lots of valid caches as well.
With https://github.com/WordPress/wordpress-develop/commit/82cd43419448c343cc3df41f6e37c6185e480038 and https://github.com/WordPress/wordpress-develop/commit/19bd759db57b4f1cc72157a446915ffbafdd838e now in core, this is no longer needed.
Query caches are defined in a cache group. With a little tweak, query caches, could be setup with a say 24 hour cache expiry. Meaning, these groups would automatically invalidate themselves. Also with
transient
andsite-transient
automatically invalidating themselves, then all other caches, should remain until WordPress invalidates them.