Sitecore - Using the recommended initial cache values

Sometimes before we deploy a website we forget to set up the recommended initial cache values (https://doc.sitecore.com/developers/91/platform-administration-and-architecture/en/recommended-initial-cache-values.html). Sitecore's documentation is pretty clear, in this post I'm just giving you the patch file you need to add to actually use these recommended initial values. 

So here you go, under App_Config/Include add this patch file: 


 <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>  
     <settings>  
       <setting name="Caching.AccessResultCacheSize" set:value="200MB"/>  
     </settings>  
     <databases>  
       <database id="master" role:require="ContentManagement or Standalone">  
         <cacheSizes>  
           <data>1000MB</data>  
           <items>1000MB</items>  
         </cacheSizes>  
         <dataProviders>  
           <dataProvider param1="$(id)">  
             <prefetch hint="raw:AddPrefetch">  
               <cacheSize>1000MB</cacheSize>  
             </prefetch>  
           </dataProvider>  
         </dataProviders>  
       </database>  
       <database id="web" role:require="ContentDelivery or Standalone">  
         <cacheSizes>  
           <data>1000MB</data>  
           <items>1000MB</items>  
         </cacheSizes>  
         <dataProviders>  
           <dataProvider param1="$(id)">  
             <prefetch hint="raw:AddPrefetch">  
               <cacheSize>1000MB</cacheSize>  
             </prefetch>  
           </dataProvider>  
         </dataProviders>  
       </database>  
     </databases>  
   </sitecore>  
 </configuration>  

Happy patching!

Comments