Title: WPStatistics compatibility
Last modified: October 30, 2021

---

# WPStatistics compatibility

 *  Resolved [harryfear](https://wordpress.org/support/users/harryfear/)
 * (@harryfear)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/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](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://ibb.co/Tk0BVwk)
    [https://wp-statistics.com/resources/troubleshoot-with-cache-plugins/](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](https://ibb.co/k9sZt3g)
 * Without this, invalid nonce errors occur on HIT: [https://ibb.co/PmC0J9p](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.
    -  This topic was modified 4 years, 7 months ago by [harryfear](https://wordpress.org/support/users/harryfear/).
      Reason: Clarity

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/wpstatistics-compatibility/#post-15024094)
 * Hi,
    First of all if you would like to bypass cache for WP JSON request you can
   easily enable that inside the plugin settings > cache tab: [https://i.imgur.com/bRFSWrF.png](https://i.imgur.com/bRFSWrF.png)
 * This should resolve your issues. But if you would like to overwrite the default`
   s-maxage` value of the plugin, you can do that again from the plugin settings
   > cache tab: [https://i.imgur.com/xBWobKx.png](https://i.imgur.com/xBWobKx.png)
 * But again I don’t think the `s-maxage` needs to be changed if you bypass the 
   WP JSON as stated above. So, try and see what happens.
 *  Thread Starter [harryfear](https://wordpress.org/support/users/harryfear/)
 * (@harryfear)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/wpstatistics-compatibility/#post-15025498)
 * Thanks, will experiment with this and revert in 48hrs.
 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/wpstatistics-compatibility/#post-15025546)
 * OK. Let me know.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WPStatistics compatibility’ is closed to new replies.

 * ![](https://ps.w.org/wp-cloudflare-page-cache/assets/icon-256x256.gif?rev=3234997)
 * [Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals](https://wordpress.org/plugins/wp-cloudflare-page-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cloudflare-page-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/reviews/)

## Tags

 * [caching](https://wordpress.org/support/topic-tag/caching/)
 * [compatibility](https://wordpress.org/support/topic-tag/compatibility/)

 * 3 replies
 * 2 participants
 * Last reply from: [iSaumya](https://wordpress.org/support/users/isaumya/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/wpstatistics-compatibility/#post-15025546)
 * Status: resolved