Correct Place To Specify A Site's Caching Parameters In Sitecore?

288 views Asked by At

An "out-of-the-box" installation of Sitecore creates the following lines in the web.config file:

<sites>
  <site name="shell" virtualFolder="/sitecore/shell" physicalFolder="/sitecore/shell" rootPath="/sitecore/content" startItem="/home" language="en" database="core" domain="sitecore" loginPage="/sitecore/login" content="master" contentStartItem="/Home" enableWorkflow="true" enableAnalytics="false" analyticsDefinitions="content" xmlControlPage="/sitecore/shell/default.aspx" browserTitle="Sitecore" htmlCacheSize="10MB" registryCacheSize="15MB" viewStateCacheSize="1MB" xslCacheSize="25MB" disableBrowserCaching="true" />
  <site name="login" virtualFolder="/sitecore/login" physicalFolder="/sitecore/login" enableAnalytics="false" database="core" domain="sitecore" disableXmlControls="true" />
  <site name="admin" virtualFolder="/sitecore/admin" physicalFolder="/sitecore/admin" enableAnalytics="false" enableWorkflow="true" domain="sitecore" loginPage="/sitecore/admin/login.aspx" />
  <site name="service" virtualFolder="/sitecore/service" physicalFolder="/sitecore/service" />
  <site name="modules_shell" virtualFolder="/sitecore modules/shell" physicalFolder="/sitecore modules/shell" rootPath="/sitecore/content" startItem="/home" language="en" database="core" domain="sitecore" content="master" enableAnalytics="false" enableWorkflow="true" />
  <site name="modules_website" virtualFolder="/sitecore modules/web" physicalFolder="/sitecore modules/web" rootPath="/sitecore/content" startItem="/home" language="en" database="web" domain="extranet" allowDebug="true" cacheHtml="true" />
  <site name="website" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content" startItem="/home" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="50MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="25MB" filteredItemsCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" cacheRenderingParameters="true" renderingParametersCacheSize="10MB" />
  <site name="scheduler" enableAnalytics="false" domain="sitecore" />
  <site name="system" enableAnalytics="false" domain="sitecore" />
  <site name="publisher" domain="sitecore" enableAnalytics="false" enableWorkflow="true" />
</sites>
<!-- CACHE SIZES -->
<cacheSizes>
  <sites>
    <website>
      <html>50MB</html>
      <registry>0</registry>
      <viewState>0</viewState>
      <xsl>25MB</xsl>
    </website>
  </sites>
</cacheSizes>

The items under <cacheSizes> seem to be duplicative of the attributes of the <site> entry for website.

Am I misunderstanding this? Is one deprecated? Is one preferred?

1

There are 1 answers

0
valikvs On BEST ANSWER

From Sitecore documentation:

If a managed Web site definition does not specify cache size attributes, the values within the /configuration/sitecore/cacheSizes/sites/* element named after the managed Web site in the web.config file apply.