title: Disable Sitecore's Html cache for one item
body: <p>I want to disable the html cache for 1 item so it is always rendered. </p>
  
  <p><strong>Background:</strong></p>
  
  <p>I need to show information for companies stored in a separate database. In sitecore I have 1 item which has the user control that shows the required information and depending on a Context parameter I figure out which company to show. </p>
  
  <p>The sitecore tree look like this:</p>
  
  <pre><code>/sitecore
    /content
      /home
        /company-information
  </code></pre>
  
  <p>The url is: <code>/show-company-information/[company-name]-[company-id]</code>. I have a pipeline module that parses the url and sets the company information as the current item and adds the company id to <code>HttpContext.Current.Items</code>. That's how my user control figures out which company information to render. </p>
  
  <p>It all works fine in development but once you deploy it to a Content Delivery server it stops working correctly. The first time the page is accessed it gets cached and every consecutive request returns the company information that was cached the first time. </p>
  
  <p>My current workaround is to clear the HTML cache for the <code>company-info</code> item in the same pipeline step that parses the company-information but it seems a really dirty solution. </p>
  
  <p>Is there a better way to achieve the same result?</p>
  
  <hr>
  
  <p>EDIT</p>
  
  <p>Here is how the site is setup in web.config and also the web database configuration:</p>
  
  <pre><code>&lt;site name="website" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/Home/" startItem="/home" language="en-GB" database="web" domain="extranet" loginPage="/user-login.aspx" allowDebug="true" cacheHtml="true" htmlCacheSize="400MB" registryCacheSize="500KB" viewStateCacheSize="500KB" xslCacheSize="20MB" filteredItemsCacheSize="20MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" /&gt;
  
  &lt;!-- CACHE SIZES --&gt;
      &lt;cacheSizes&gt;
        &lt;sites&gt;
          &lt;website&gt;
            &lt;html&gt;500MB&lt;/html&gt;
            &lt;registry&gt;500KB&lt;/registry&gt;
            &lt;viewState&gt;500KB&lt;/viewState&gt;
            &lt;xsl&gt;200MB&lt;/xsl&gt;
          &lt;/website&gt;
        &lt;/sites&gt;
      &lt;/cacheSizes&gt;
  
  &lt;database id="web" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel"&gt;
      &lt;param desc="name"&gt;$(id)&lt;/param&gt;
      &lt;icon&gt;Network/16x16/earth.png&lt;/icon&gt;
      &lt;securityEnabled&gt;true&lt;/securityEnabled&gt;
      &lt;dataProviders hint="list:AddDataProvider"&gt;
        &lt;dataProvider ref="dataProviders/main" param1="$(id)"&gt;
          &lt;disableGroup&gt;publishing&lt;/disableGroup&gt;
          &lt;prefetch hint="raw:AddPrefetch"&gt;
            &lt;sc.include file="/App_Config/Prefetch/Common.config" /&gt;
            &lt;sc.include file="/App_Config/Prefetch/Web.config" /&gt;
          &lt;/prefetch&gt;
        &lt;/dataProvider&gt;
      &lt;/dataProviders&gt;
      &lt;indexes hint="list:AddIndex"&gt;
        &lt;index path="indexes/index[@id='articleIndex']" /&gt;
      &lt;/indexes&gt;
      &lt;proxiesEnabled&gt;false&lt;/proxiesEnabled&gt;
      &lt;proxyDataProvider ref="proxyDataProviders/main" param1="$(id)" /&gt;
      &lt;archives hint="raw:AddArchive"&gt;
        &lt;archive name="archive" /&gt;
        &lt;archive name="recyclebin" /&gt;
      &lt;/archives&gt;
      &lt;Engines.HistoryEngine.Storage&gt;
        &lt;obj type="Sitecore.Data.$(database).$(database)HistoryStorage, Sitecore.Kernel"&gt;
          &lt;param connectionStringName="$(id)" /&gt;
          &lt;EntryLifeTime&gt;30.00:00:00&lt;/EntryLifeTime&gt;
        &lt;/obj&gt;
      &lt;/Engines.HistoryEngine.Storage&gt;
      &lt;cacheSizes hint="setting"&gt;
        &lt;data&gt;400MB&lt;/data&gt;
        &lt;items&gt;400MB&lt;/items&gt;
        &lt;paths&gt;10MB&lt;/paths&gt;
        &lt;standardValues&gt;1MB&lt;/standardValues&gt;
      &lt;/cacheSizes&gt;
    &lt;/database&gt;
  &lt;/databases&gt;
  </code></pre>
  
  <p>Page layouts structure:</p>
  
  <pre><code>layout - no output caching
    - sublayout - no caching options ticked
      - offending sublayout - no caching options ticked
  </code></pre>
  
  <p>Are we doing anything wrong for this to be cached so aggressively? </p>