How does no_cache between domains work?
drolatic-labs
HOBBYOP

8 months ago

I've got a test project - a barebones react app for testing caching. I simply want to push development changes directly to github, and auto-build and deploy those changes live, and I'm finding it perplexing how changes propagate.

My DNS is with Cloudflare, with a Railway Custom Domain set on the project, proxied through Cloudflare CNAME at the root level.

I'm pushing some simple changes through the github pipeline with the following:

  • NO_CACHE=1 set on the Railway project service variable

  • Cloudflare "development mode" and forced cache purges

  • Browser cache purges, accessing the site on different devices, on different networks, etc.

For some reason the live site accessed through the root domain still retains old changes from 4 hours ago, regardless of subsequent pushes and deploys.

The funny thing is when I created a new subdomain "www", proxied it through Cloudflare, then redeployed, it captured all my current changes. So now I have my root domain showing content from 4 hours ago, and my new domain showing current content...

I've seen from previous threads the answer is always "We don't cache anything on our side", but isn't this behavior very strange? I've just been doing some of the most basic tests to evaluate the platform and it's had me baffled.

Solved$10 Bounty

Pinned Solution

sim
FREE

8 months ago

In some cases, purging alone doesn’t fully clear the cache. You might find more helpful context in Cloudflare’s forums — this thread could be a good starting point: https://community.cloudflare.com/t/how-to-totally-disable-coudflare-cache/628352/7

4 Replies

8 months ago

What you are running into looks to be cloudflare's cache.
Try following this: https://developers.cloudflare.com/cache/how-to/purge-cache/
or going to the caching / configuration page and clicking purge everything

Attachments


sim
FREE

8 months ago

Since the new subdomain reflected the latest changes immediately, it’s unlikely the caching is happening on Railway’s side. The caching issue is on Clouflare's end. Disable CND if active


sim
FREE

8 months ago

In some cases, purging alone doesn’t fully clear the cache. You might find more helpful context in Cloudflare’s forums — this thread could be a good starting point: https://community.cloudflare.com/t/how-to-totally-disable-coudflare-cache/628352/7


drolatic-labs
HOBBYOP

7 months ago

All good, trying all the cache disabling methods and waiting a bit worked out.


Status changed to Solved chandrika 7 months ago


Loading...