How To Cache Personalised Content With Episerver CMS

In today's episode, I talk about how you can cache your Episerver pages that contain personalized content like logged in user data, or, a visitor group. Trust me when I say this, getting your caching wrong can be a big deal and can cost a company money and open your website up to security vulnerabilities, so you need to ensure you set everything up correctly.

When it comes to caching Episerver page, you will always want to ensure you have the visitor group keys added to your output cache. To do this see this article:

https://www.david-tec.com/2014/03/Enabling-output-caching-on-an-EPiServer-site-that-uses-Visitor-Groups/

After that, you need to decide if you want to use Javascript to render your personalized content or use a donut cache strategy.

More information about donut caching in Episerver can be found here: 

http://www.jondjones.com/learn-episerver-cms/episerver-developers-guide/episerver-caching/how-to-implment-a-donut-hole-cache-in-episerver

My advice, unless you have a really good reason not to. I suggest going down the Javascript route. This approach means you can leverage your CDN to its full potential while reducing the total bandwidth that gets sent to your web server.