Serving 'cached for guests pages' from CDN. Possible?

Anatoliy

Well-known member
Hi,

I use Redis and I use Cloudflare. Is there a way to serve from cloudflare not only static content but also pages that are cached by redis for guests?
That would be awesome.
 
Yes possible with Cloudflare Business plan only.

you mean that "bypass on cookies" thing? from what I read in other threads it works together with xf add-on. and that add-on was for xf1.
or it works with xf2.1 without add-on?
 
For XF 2.1, you need this addon:

That's actually funny. ) I installed LiteSpeed server on my VPS, installed LS cache add-on fo XF2, and then heard from LS support that they do not recommend using a dynamic cache in addition to LSCache like CloudFlare's business plan.
 
I’m considering moving to this setup with cloudflare html caching. What’s missing though is a simple add on that sends purge requests to Cloudflare when threads are replied to.

so for a reply, the thread URLs should be purged and forum index purcged. Can be done through cloudflare api.

arn
 
I’m considering moving to this setup with cloudflare html caching. What’s missing though is a simple add on that sends purge requests to Cloudflare when threads are replied to.

so for a reply, the thread URLs should be purged and forum index purcged. Can be done through cloudflare api.

arn
It looks like their Railgun is doing kind of what you're describing.
 
It looks like their Railgun is doing kind of what you're describing.

railgun seems slightly different. And can be used in conjunction with guest caching. It still requires pulling data from the origin server.
 
For XF 2.1, you need this addon:

so I'm getting closer to switch to cloudflare's business plan. I'm reading their docs and I have a question. Why do I need this addon you mentioned for 'bypass on cookie? I can see that xenforo sets xf_user cookie. I can use it for cloudflares 'bypass on cookie'. It looks like there is no need in the addon you indicated in this. Please explain.
 
I’m considering moving to this setup with cloudflare html caching.

Have you already moved?

What’s missing though is a simple add on that sends purge requests to Cloudflare when threads are replied to. so for a reply, the thread URLs should be purged and forum index purcged. Can be done through cloudflare api.
well, that's for those, who visit a site the first time? I don't think that they care about delay in 30 mnts for new posts.
it's important for logged in users, and that's when Railgun should be used. As far as I understood.
 
so I'm getting closer to switch to cloudflare's business plan. I'm reading their docs and I have a question. Why do I need this addon you mentioned for 'bypass on cookie? I can see that xenforo sets xf_user cookie. I can use it for cloudflares 'bypass on cookie'. It looks like there is no need in the addon you indicated in this. Please explain.

the xf_user cookie doesn’t get set if they don’t check remember me.

Have you already moved?


well, that's for those, who visit a site the first time? I don't think that they care about delay in 30 mnts for new posts.
it's important for logged in users, and that's when Railgun should be used. As far as I understood.

I have it up and running right now.

the cache clearing is so active thread replies don’t show up in batches all at once. Also things can be out of sync. Like a forum might show 20 replies but the thread only 15. If you stay with short cache time outs it’s not necessary.

xenforos guest cache blindly caches every 5 mins.

I wanted to push it longer so I ended up writing a script to purge the cache selectively based on the database. New posts -> purge thread + forum. Moderators posts and edited posts. It’s a bit more complicated than that. But seems to be working so far. Set to 30 min cache timeout. Not sure how much it helps. Still evaluating.

Oh - business accounts only let you set cache expiration as short as 30 mins. To go shorter you have to either have enterprise or use a custom cloudflare worker which has some marginal
extra cost.
 
Top Bottom