Try our conversational search powered by Generative AI!

Episerver caching

Vote:
 

Hi all,

We are making use of the attribute 'httpCacheExpiration' which is set in the episerver.config/web.config on a 7.5 site

We believed that having this setting wouldn't cache any blocks on the page.

However, we have noticed that this isnt the case and blocks are indeed being cached.

Is anyone able to confirm that this is the correct behaviour?

Thanks in advance,

A

#172665
Dec 07, 2016 16:16
Vote:
 

The page and block is cached with episerver if you have the attribute on the page controller, [ContentOutputCache]. This is important witch blocks that have a controller if not you will cache block and page together.

More from episerver:

We also add the “ContentOutputCache” to the action to make sure it’s cached. This is very important when using local blocks or content areas on a page, where the sub content has controllers. For every sub content with a controller (it’s possible to have a page or block with only a view), we will make a new request to render the sub content. This costs. By using the “ContentOutputCache” we will cache the output until someone publishing something in the CMS. If you can’t use the “ContentOutputCache”, for example when using child actions (RenderAction), consider skipping the controller for the block.

http://world.episerver.com/blogs/Jonas-Bergqvist/Dates/2012/11/Rendering-EPiServer-MVC-request--Part-1/

#172721
Dec 08, 2016 21:27
* 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.