it will cache wp-statistics
-
i have install wp-statistics,i found “WP Cloudflare Super Page Cache” will cache wp-statistics,how to fix it?
-
This topic was modified 5 years, 3 months ago by
loukky.
-
This topic was modified 5 years, 3 months ago by
-
Hi @loukky,
WP Statistics is something that shows up on the admin side and admin side are never cached so, I don’t see a reason why WP Statistics will be cached. The whole wp-admin side is not cached.maybe the reason is that i set wp-statistics cache mode.I will keep watching
Hi @loukky,
Can you share a screenshot of the issue? Cause again as I said the admin side of WordPress is never cached and WP Statistics shows up on the admin side. So, no chance for that page to be cached.infact now i the disable wp cloudflare super page cache…so the screenshots look dont have any issue,but i type the issus on screenshots.
here are screenshots:
https://imgur.loukky.com/imgs/2021/02/d0634c27e06dddac.png
https://imgur.loukky.com/imgs/2021/02/0febc23e66f804bc.pngHi @loukky,
I see what you mean. And it is funny that you mention that as today only I opened a core track ticket about it which you can find here: https://core.trac.ww.wp.xz.cn/ticket/52636Maybe you can also chime in here and explain why WordPress should include a proper cache-control header for the
wp-jsonREST API endpoints. Now it is up to the WP core team to either add no-cache cache-control for wp-json endpoints or give users an option to add that for those who need that.BTW are you on an nginx server or apace or lightspeed server? Can you let me know that?
My website are running on Apache server.And i have read your core ticket,but i am sorry i cant help you,my English is very poor…
Hi @loukky,
Are you using Apache 2.4.x? If so we add this code inhtaccesswhich is supposed to work:<IfModule mod_headers.c> <If "%{THE_REQUEST} =~ m#\s/+wp-json/?[?\s]#"> Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0" </If> </IfModule>Can you verify 2 things:
1. Are you using Apache 2.4?
2. Do you see the above htaccess rule in your htaccess file?2.4.46 this is my Apache version,and i dont see these rules in .htaccess file.
so i need to type these rules to .htaccess file?Hi @loukky,
No need. Inside the plugin settings click on “Disable Page Cache” and then once the page reload, click on “Enable Page Cache” that should add that rule. Let me know if that works.now i have enable wp cloudflare page super cache,i found wp-Statistics is still cached by cloudflare,i think i know,but i dont know how to expression because of my poor English,you access my website and i think you can know why….
my blog:https://loukky.comHi @loukky,
Just tell me that do you see the above htaccess file in your htaccess file now?Yes i do
Hi @loukky,
Can you now comment/remove that code and replace it with:<IfModule mod_expires.c> ExpiresActive on ExpiresByType application/json "access plus 0 seconds" </IfModule>After you do that purge your whole Cloudflare cache. Let me know once done.
-
This reply was modified 5 years, 3 months ago by
iSaumya.
Done,this url will not cache now…
Hi @loukky,
Yes this is the easiest possible hack which is only possible in apache/lightspeed servers to force not caching ofwp-jsonuntil WordPress core team adds a way to have provecache-controlheader for rest API endpoints.So, test now and let me know. Things should work now.
-
This reply was modified 5 years, 3 months ago by
The topic ‘it will cache wp-statistics’ is closed to new replies.