Object 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


Object Cache
Object cache stores the metadata about SharePoint Server objects (like Sub Site(Web), Site Collection, List, library, etc.) on the WFE server's RAM. When a page is rendered for the first time, the settings of these objects are saved on WFE RAM, and for the next time when the same page or data need to be retrieved through these objects, the SQL Server will not be hit and data is taken from the cache it self. Features of SharePoint that uses Object cache are publishing, content query web part, navigation, search query box and metadata navigation.
This is enabled by default. And can not be disabled. The default size for this cache is 100 MB.
This cache can be managed on two levels, first is Web application and second is site collection.
For Web application level, size of This cache can be increased in web.config file of the particular web application.
1.      Make sure that you are the local administrator on the local WFE server to configure the Object cache settings.
2.      Go to Start – Administrative Tools – Internet Information Services (IIS) Manager.
3.      In IIS Manager, Under Connections pane, Click on the + sign next to your server name and then click on + sign next to Sites to view the web applications.
4.      Right Click on the name of the web application where you want to enable blob cache and select Explore.
5.      Search for the file Web.config and Right Click on it and open this file in Notepad.
6.      In the file search for "<ObjectCache" and the line should be something like as follows
<ObjectCache maxSize ="100")
7.      In this line change the MaxSize, this size is in MB. Remember that this space will be used form the RAM of each WFE servers. Minimum recommended cache size is 100 MB that is by default.
8.      Save the file and close it.
This process will reset the web application so make sure that you are will need downtime before saving web config file.
To increase the cache size on Site collection Level
Navigation is Site Settings -> Site Collection Administration -> Site Collection Object Cache
Max size - Max size defines the size of the object cache. When the object cache becomes larger than this value, least popular entries (based on hit count) will be trimmed from the cache. Specifying a larger size can therefore enhance the performance for large sites at the cost of memory on the WFEs.
Multiplier- A Multiplier can be used to retrieve more results than requested. This is to ensure that all clients requesting data can be served correctly by the result set in the cache, even if they have a different permission set. The multiplier can have a value that ranges from 1 to 10.

Flushing the Object Cache - If you need to flush the cache you can navigate to the page and check the Flushing checkbox. When you click the OK button the object cache will be flushed on all the web front-end servers.

Other Cache options in SharePoint
  1. BLOB Cache
  2. Page Output Cache

No comments:

Post a Comment