Localization with CDN Page Caching



We have a Episerver 11 website hosted in Azure DXC. We have our own Akamai CDN on top of in built Cloudflare offered by DXC.

We are caching the entire page along with Html etc in Akamai cache.

We were using Episerver default xml localization strucuture to show the localized text for the properties, but now we are planning to move to Database architecture instead of XML files in the solution, So that editors can make changes dynamically on live site. I am using https://blog.tech-fellow.net/2016/03/01/episerver-database-localization-provider-released/ for achieving this.

My question is, as we are caching the entire page, there can be some properties which multiple pages must in used in. So, a single change will impact multiple pages which are cached, those needs to be refreshed with changed content. Does anyone know how can we solve this issue considering the solution I am going to use mentioned in the link above.

Please let me know if anyone have encountered this kind of issue, or need more clarification.

Best Regards,

Sanket Mahimkar

Edited, Nov 27, 2019 17:48

I would probably ask if this is a problem that needs to be solved first. Changing localization texts is a rare occurence and if the old text is shown a couple of minutes because it's cached is normally not a real issue. If it really is, of course cache time can be lowered to reduce the problem. If it's critical but very rare you can manually purge cache on frontend nodes when doing a big deploy etc. If it's critical and very common I would get those localized values by javascript api instead. I know there is a good built in api for Valdis localization provider (I'm using it myself in SPAs). 

Trying to build some advanced cache purge push hierarchy I would stay away from. It will likely generate more errors than it solves.

Happy coding and good luck!

Edited, Nov 28, 2019 10:07

Hi Daniel,

I am planning to use Valdis localization provider too.

Are you talking about whole website cache purging?. Currently we purge cache for a specific page lets say when page gets newly published (by hooking an event while publishing). I want to do the similar kind of solution, but with localization the problem is:

a. Valdis provider is an nuget package, so I am not sure how much it is extendable for hooking an event so that when editor makes changes to localization text, it can reflect on the pages it affects.

2. A single Localization text can be used on mulitple pages, so, all the pages which are using the updated text by editor should be purged cache.

I am not sure by hooking an event or something how can we purge those specific set of website pages.

//Sanket Mahimkar

Dec 02, 2019 14:28