Tuesday, October 29, 2013

Cache profiles in SharePoint

SharePoint adds caching mechanism with output caching that is available in ASP.Net 2.0. It contains Cache profiles that we can name and apply the pages and page items, content types and levels of scales in the development environment.

By using cache profiles we can control the quality level of the output caching in SharePoint site. It will allow or disallow site owners to choose their cache profiles. We can manage the user access permissions to SharePoint depending on the access to the site. Output cache renders the page, same way for users in same right. After creating and deploying the cache profile, any change that affects the cache profile will affects all the content access of the profile.

To enable output cache settings,
Navigate to Site Settings menu and click on Site Collection Output cache in Site Collection Administration section


In the Output Cache Settings page, check Enable output cache check box to enable output cache.



Select cache profile for anonymous from Anonymous Cache Profile list. This applies for anonymous users access for a site in Site Collection. To choose authenticated users from Authenticated Cache profile list. This will apply for authenticated users to access in a site in the Site Collection. To display additional cache information on the site collection pages that including the date and time of the page rendered earlier select Enable debug cache information on pages.

To create new caching profiles,
Navigate to Site Setting menu in SharePoint site. Click on Site collection cache profiles in Site Collection Administration.


Click on New to Create new cache profile.


Provide Title, Display Name, Description for Cache profile in Title, Display name Display Description columns. To ensure that all items in the cache are security trimmed check “Perform ACL Check” check box. To enable the cache, check “Enabled” check box. Enter Duration to specify the number of seconds to keep the cached version available. Check for changes will validates the page requests that the site has and to flush the cache. If we unchecked this system will not check for the updates on the sites.



Vary by custom parameter, Vary by HTTP Header and Vary by User Rights will specifies the values described in the ASP.Net cache policy. By selecting Vary by User Rights, we can ensure that users will have effective rights on the SharePoint site that having on the cached page. Select any value in Cacheability drop down  Select the policies to allow the authenticated users and page layout designers to apply authenticated scenarios. Check “Allow Writers to View Cached Content” to not allowing people with edit rights to cache their pages.


Share this