Platform Administration and Architecture

Configure Prefetch cache values

Applies to

Content Delivery, Content Management

To configure the Prefetch cache values:

  1. Create a patch file for cache size values. For example, custom.prefetch.config.

  2. Use rule-based configuration to target different environments. The following example sets custom Web database cache values for Content Delivery, and Master database cache values for Content Management:

    <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 param1="$(id)">
                        <prefetch hint="raw:AddPrefetch">
                            <cacheSize>1000MB</cacheSize>
                        </prefetch>
                    </dataProvider>
                </dataProviders>
            </database>
            <database id="web" role:require="ContentDelivery or Standalone">
                <dataProviders>
                    <dataProvider param1="$(id)">
                        <prefetch hint="raw:AddPrefetch">
                            <cacheSize>1000MB</cacheSize>
                        </prefetch>
                    </dataProvider>
                </dataProviders>
            </database>
        </databases>
    </sitecore>
    </configuration>
    
  3. Deploy your configuration file to the <root>/App_Config/Includes folder. You can check your changes by visiting /sitecore/admin/showconfig.aspx and searching for patch:source="custom.prefetch.config".