Try our conversational search powered by Generative AI!

How to cache a page for anonymous user



I sense this should be an easy solution. The case is the following: every week our communications department publishes new articles. Our visitors spike when they send emails advertising the new articles. You can see the articles either as an anonymous user or you can be logged in.

I would like it if EpiServer could cache the articles for anonymous users, but not for logged in users.

How would one do this?


Apr 19, 2016 20:54

You can decorate your page controllers with ContentOutputCache attribute.

UseOutputCache method in EPiServer.Web.OutputCacheHandler will make sure that output cache is not used for authenticated users.

Apr 19, 2016 22:32

Thanks!  I thought it would be something simple like this :)

Apr 20, 2016 2:02
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.