How to cache a page for anonymous user

Vote:
 

Hi,

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?

Hugo

#147612
Apr 19, 2016 20:54
Vote:
 

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.

http://www.epiknowledge.com/en/episerver/75/performance/output-cache/

#147613
Apr 19, 2016 22:32
Vote:
 

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

#147615
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.