Platform Administration and Architecture

Disable Prefetch cache prefetching

Applies to

Content Delivery, Content Management

The Prefetch caches is populated on application initialization and continues to be populated during the lifetime of the application. The list of items to prefetch is defined per database, and includes items such as data templates and presentation components by default.

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.