WPStatistics compatibility
-
Hi folks,
WPStatistics has a mode whereby it can use the WP-JSON API, which WP Cloudflare Super Page Cache kindly by default doesn’t cache.
WPStatistics doesn’t use this route by default (dunno why? to minimise requests?) but it can be turned on easily: https://ibb.co/Pr8Ytnk
However, each hit on the JSON API has a nonce, but apparently they expire after 12 hours. https://ibb.co/Tk0BVwk
https://wp-statistics.com/resources/troubleshoot-with-cache-plugins/It seems therefore that “Cloudflare Cache-Control max-age” should be set at no more than “43200” (seconds) (i.e. 12 hours) for the WPStatistics API to behave as expected.
I’ve set mine at 43199 seconds. https://ibb.co/k9sZt3g
Without this, invalid nonce errors occur on HIT: https://ibb.co/PmC0J9p
Is this configuration sensible? And is there any way that this could be solved on the side of either plugin?
Thanks,
Harry.
- The topic ‘WPStatistics compatibility’ is closed to new replies.