Page Output Cache

SharePoint Caching
Caching is used to improve the performance of any software and it reduces the load on backend supportive software. In SharePoint Caching reduces the overhead and dependency of SharePoint server from SQL server. When we use cache in SharePoint server it saves all data on WFE server's Ram and/or their physical drives and then show the future results from that saved data. This data is replica of the copy of original data. Whenever a data is changed in server it automatically changed in cache data also. There are total four type of Caching is available in SharePoint 2013.
Source -
https://technet.microsoft.com/en-us/library/ee424404.aspx


Page Output Cache
Page output caching stores rendered output of all controls on a given aspx page, and it also stores several different versions of the pages that has been already rendered. This cache is stored in RAM of individual WFE servers. The settings for this cache can be configured at the site collection level, the site level, and for individual page layouts.
The page output cache is turned off by default. Once we enabled the Page Output Cache settings, after a page is first rendered for a user in a given user class, each subsequent time that the user views that page in the same class, the page loads faster because the controls on the .aspx page do not need to run again to generate the HTML file as that is already stored in the RAM (Page output cache). The amount of time required to render the page is reduced. The page output cache can improve server performance because it reduces server control activities and calls to the database.
Limitations -
1.      This cache is used with publishing pages and can not be used with collaboration sites.
2.      Output cache should not be used with sites using low read to write ratio because frequent changes to content make it hard to keep the cache fresh.
Configuring page Output Cache -
Before enabling the Page output cache on a site in the SharePoint, we should know about the “Cache Profiles”.
Cache profile defines the following settings for Page output cache.
1. Duration of seconds to keep the items in the cache.
2. Security trimming settings
3. Enabling or Disabling the cache
4. Enabling or Disabling the check for changes to the page(updated versions of the page) with the specified duration(Duration field).
Following are the Out-Of-Box Cache profiles.
Disabled, Public Internet (Purely Anonymous), Extranet (Published Site), Intranet (Collaboration Site)
You can see these profiles on this location
Navigation is Site Settings -> Site Collection Administration -> Site Collection Cache Profiles
If you want to create a new Cache profile, navigate to “new item” link. It will take you to the following page.
Now we can go through the configuring the cache settings.
Configure page output cache settings for a site collection
Navigation is Site Settings -> Site Collection Administration -> Site Collection Output Cache
Configure page output cache settings at the site level
Navigation is Site Settings -> Site Administration -> Site Output Cache
Select Inherit from site collection or select individual pages for output cache.
Configure page output cache settings for page layouts
Navigation is Site Settings -> Web Designer Galleries -> Master Pages and Page Layouts.
1.      Select the page layout that you want to apply the cache feature.
2.      Check out the file and edit properties.
3.      select any one of the option from Authenticated Cache Profile or Anonymous Cache Profile.
Click OK and Check in the file.

Other cache options -

  1. BLOB Cache
  2. Object Cache

No comments:

Post a Comment