Open KTS915 opened 7 years ago
Here's the relevant nonce_life
line in WordPress: https://github.com/WordPress/WordPress/blob/4.7.3/wp-includes/pluggable.php#L1822
The only problem I see with dynamically adjusting the cache expiration time is that would mean adjusting the cache expiration time for all of the cache (including anonymous visitors). It's currently not possible to dynamically specify a cache expiration time (although we do have a related GitHub issue open here: https://github.com/websharks/comet-cache/issues/170).
@jaswrks Any thoughts on this feature request?
I understand that Comet Cache sensibly limits the lifetime of a cache that includes a nonce for the following reason (explained in #793):
I have recently come across a plugin called Nonce Extender. A quick look in its code showed me that it uses a WP filter called
nonce_life
that I had not heard of before, but which allows a user to extend the life of a nonce.So I am wondering whether it would be possible for Comet Cache to detect whether such a filter has been used on a site, and then to adjust the lifetime of the cache to reflect the adjusted lifetime of the nonce. (Just to be clear, I am suggesting this only for nonces of logged-in users.)