Platform Administration and Architecture

Disable Prefetch cache prefetching

Abstract

Guide to tuning the Sitecore Content Delivery and Content Management Prefetch cache.

Applies to

Content Delivery, Content Management

The Prefetch caches are populated on application initialization and continue to be populated during the lifetime of the application. The list of items to prefetch is defined per databases in configuration files in the /App_Config/Prefetch folder.

If the list of items to prefetch becomes too large, application initialization can take longer. If you disable prefetching, it takes longer for the application to warm up and reach optimum performance.

To disable prefetching:

  • Delete the <template> and <item> children of the <prefetch> element as shown in the following example:

    <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="web">
                    <dataProviders>
                        <dataProvider param1="$(id)">
                            <prefetch hint="raw:AddPrefetch">
                                <patch:delete />
                            </prefetch>
                            <prefetch hint="raw:AddPrefetch">
    			    <cacheSize>1000MB</cacheSize>
    			    <childLimit>100</childLimit>
    			    <logStats>false</logStats>
                            </prefetch>
                        </dataProvider>
                    </dataProviders>
                </database>
                <database id="master">
                    <dataProviders>
                        <dataProvider param1="$(id)">
                            <prefetch hint="raw:AddPrefetch">
                                <patch:delete />
                            </prefetch>
                            <prefetch hint="raw:AddPrefetch">
    			    <cacheSize>1000MB</cacheSize>
    			    <childLimit>100</childLimit>
    			    <logStats>false</logStats>
                            </prefetch>
                        </dataProvider>
                    </dataProviders>
                </database>
            </databases>
        </sitecore>
    </configuration>

Note

Disabling prefetching does not disable the Prefetch cache. The cache is populated as items are accessed rather than on application initialization.