Configure Prefetch cache values
|
Applies to |
Content Delivery, Content Management |
|---|
Sitecore populates prefetch caches on application initialization and maintains those caches over the life of the application. To configure the Prefetch cache values:
-
Create a patch file for cache size values. For example,
custom.prefetch.config. -
Use rule-based configuration to target different environments. The following example sets custom Web database cache values for the Content Delivery role, and Master database cache values for the Content Management role:
RequestResponse<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"> <sitecore> <databases> <database id="master" role:require="ContentManagement or Standalone"> <dataProviders> <dataProvider> <param desc="headProvider"> <dataProvider> <prefetch> <cacheSize>1000MB</cacheSize> </prefetch> </dataProvider> </param> </dataProvider> </dataProviders> </database> <database id="web" role:require="ContentDelivery or Standalone"> <dataProviders> <dataProvider> <param desc="headProvider"> <dataProvider> <prefetch> <cacheSize>1000MB</cacheSize> </prefetch> </dataProvider> </param> </dataProvider> </dataProviders> </database> </databases> </sitecore> </configuration> -
Deploy your configuration file to the
<root>/App_Config/Includesfolder. You can check your changes by visiting/sitecore/admin/showconfig.aspxand searching forpatch:source="custom.prefetch.config".