admin管理员组文章数量:1186260
So i've made an extra menu item people see when they log on to the wordpress admin backend, and then go to the front-end. This works perfectly, except it doesn't when i set the cloudflare cache to Cache Level: Cache Everything. I need the Cache Level: Cache Everything because cloudflare will see it as DYNAMIC, and the site isn't as fast as i would like to.
Thus far I've tried this: / and I've tried manipulating the URL when logged in and bypassing that URL. Unfortunately, all these options didn't work. And it resulted in the user only seeing the extra menu item when manually force refresh the browser or when the cache expires.
Does someone have a brilliant idea so i can show the visitors the extra menu item on the frontpage whilst not having to compromise the caching.
So i've made an extra menu item people see when they log on to the wordpress admin backend, and then go to the front-end. This works perfectly, except it doesn't when i set the cloudflare cache to Cache Level: Cache Everything. I need the Cache Level: Cache Everything because cloudflare will see it as DYNAMIC, and the site isn't as fast as i would like to.
Thus far I've tried this: https://www.kevinleary.net/blog/cloudflare-caching-for-wordpress/ and I've tried manipulating the URL when logged in and bypassing that URL. Unfortunately, all these options didn't work. And it resulted in the user only seeing the extra menu item when manually force refresh the browser or when the cache expires.
Does someone have a brilliant idea so i can show the visitors the extra menu item on the frontpage whilst not having to compromise the caching.
Share Improve this question asked Jan 25 at 15:19 user9197703user9197703 91 bronze badge1 Answer
Reset to default 0You have to configure Cloudflare to always bypass the cache for logged in users.
You either need to switch to using Cloudflare APO for WordPress which handles disabling the cache for logged in WordPress users automatically (among many other things), or you could try creating a Cache Rule that checks if the user is logged in, by looking for a specific WordPress cookie or something, and disables the cache for those requests. I think you would look for a cookie with a name that starts with wordpress_
to determine if the user is logged into WordPress.
It looks like the website you linked has you setting up a Cache Rule that bypasses the cache for logged in users. Either you didn't configure that, or their recommended rule isn't working for some reason.
本文标签: wordpressBypass cloudflare cache when logged in to show extra menu item on frontpageStack Overflow
版权声明:本文标题:wordpress - Bypass cloudflare cache when logged in to show extra menu item on frontpage - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738353633a2079436.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论