admin管理员组文章数量:1404560
I use Cloudflare heavily on all my sites. On I use the MyListings Theme which uses an AJAX login and Woo Commerce. The user never sees the default wordpress dashboards and control panels.
I now have caching issues with logged in users - My theory is that Cloudflare cannot determine when a user is logged in or not, so it is displaying the cached anonymous logged out view.
When I disable cloudflare the site works fine.
Reading on Cloudflare it sounds like "Bypass Cache by Cookie" is the only option to tell whether or not a user is logged in. However, this is a $200 Business license on Cloudflare which is out of the question for a hobby site.
This is a long read, but halfway down someone suggests that the headers WP returns should be respected by CloudFlare:
How can I use Cloudflare caching on a Wordpress site that uses front-end user logins?
I use Cloudflare heavily on all my sites. On https://pokerdiy I use the MyListings Theme which uses an AJAX login and Woo Commerce. The user never sees the default wordpress dashboards and control panels.
I now have caching issues with logged in users - My theory is that Cloudflare cannot determine when a user is logged in or not, so it is displaying the cached anonymous logged out view.
When I disable cloudflare the site works fine.
Reading on Cloudflare it sounds like "Bypass Cache by Cookie" is the only option to tell whether or not a user is logged in. However, this is a $200 Business license on Cloudflare which is out of the question for a hobby site.
https://support.cloudflare/hc/en-us/articles/218411427-Understanding-and-Configuring-Cloudflare-Page-Rules-Page-Rules-Tutorial- https://support.cloudflare/hc/en-us/articles/236166048 https://support.cloudflare/hc/en-us/articles/228503147-Speed-Up-WordPress-and-Improve-Performance
This is a long read, but halfway down someone suggests that the headers WP returns should be respected by CloudFlare: https://support.cloudflare/hc/en-us/articles/236166048
How can I use Cloudflare caching on a Wordpress site that uses front-end user logins?
Share Improve this question edited Jan 13, 2020 at 23:02 Rodney asked Jan 13, 2020 at 22:29 RodneyRodney 1337 bronze badges1 Answer
Reset to default 1I have found the answer there: http://jhewitt/2018/12/improving-wordpress-speed-with-cloudflare-workers/
Using Workers you can examine a request for WP cookies and exclude it from the cache. This solution works well as I have implemented it.
本文标签: cacheUsing Cloudflare caching on wordpress with frontend user logins
版权声明:本文标题:cache - Using Cloudflare caching on wordpress with front-end user logins 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744838525a2627779.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论