Sitecore and Cloudflare - Personalization problem

160 views Asked by At

Whenever we purge cache in Cloudflare, we somehow lose the personalization on the Sitecore SXA page. This happens regularly and also on the subpages especially (basically the parent page shows everything correctly). This happens also most of the time inside the footer page design, as it has the personalization activated for certain component inside the footer.

Does anyone knows what the issue can be? Like I said the problem happens whenever we purge the cache inside the Cloudflare.

Also, this always happens inside the en-us language culture, nowhere else.

1

There are 1 answers

0
fab23 On

With no more info is not so easy to understand where to fix this issue.

In your application you should try to disable cache for static assets, you will get load if under real heavy traffic then take care. This way you will make resources not cached forcing clients to retrieve all data (css, js and so on).

When you will find the bunch of files which makes you hungry (aka the files which cause your issue) you can restore default expire headers.

You can try this if you are not on free plan (if are on free plan min TTL on edge is 2h):

Cloudflare cache rule

  1. set edge cache TTL to 30s
  2. set browser cache TTL to respect existing headers
  3. set origin cache control to ON
  4. set performance to OFF