More in this section

Forums / Developing with Sitefinity / Caching -> recommendations?

Caching -> recommendations?

3 posts, 0 answered
  1. clayman
    clayman avatar
    38 posts
    23 Sep 2009
    06 Apr 2010
    Link to this post
    using Sitefinity 3.7 SP1

    We have a very large website with a hefty amount of product content.  Some pages pull several pieces of content from the CMS in addition to retrieving some enterprise content from other databases.  In order to improve the performance of the site and get closer to the performance we had without the CMS I would like to have a batch program crawl the site and "pre-cache" the page output in memory / provider / etc.  Ideally the cache would be up all day, and would only be recycled once per day as part of a data refresh.

    So - here is how I am using the caching today:

    in the web.config:
    <caching defaultProvider="ASPNET">
              <add name="memoryCache" type="Telerik.Caching.MemoryCachingProvider, Telerik.Framework"/>
              <add name="ASPNET" type="Telerik.Caching.AspNetCachingProvider, Telerik.Framework" duration="120" slidingExpiration="true"/>
            <cacheDependency mode="InMemory"/>

    then within the page properties in the sitefinity admin tool:
    * checked "Disable ViewState"
    * checked "Enable caching"
    * unchecked "Use default settings"
    * set duration to a high number (e.g. 36000)

    So is this the proper/best  way to configure sitefinity given my scenario (large # of pages cached, very long cache duration)?  What is the storage limit of the output cache?  Any other suggestions?
  2. clayman
    clayman avatar
    38 posts
    23 Sep 2009
    07 Apr 2010
    Link to this post
    Another question - does sitefinity output caching vary by user-agent?

    It would seem that it does, and I would like to change that behavior.

    In plain ASP.NET there is an attribute on the OutputCache tag called VaryByHeader that would allow you to set this property.

    Since Sitefinity is generating the page dynamically, I'm wonder how I can change this behavior - is it a configuration change or do we need to implement a custom handler/module to override this?

    Thanks for the prompt response.
  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    08 Apr 2010
    Link to this post
    Hi clayman,

    Thank you for using our services.

    Your settings for caching look OK. I do not think I have anything to add. The provider which is used for pages caching is set from the <cms> configuration section in web.config. By default it is set to ASPNET:
    <cms defaultProvider="Sitefinity" pageExtension=".aspx" disabled="false"
        <clear />
        <add connectionStringName="DefaultConnection" allowPageHistory="true"
         allowPageWorkflow="false" cachingProviderName="ASPNET" name="Sitefinity"
         type="Telerik.Cms.Data.DefaultProvider, Telerik.Cms.Data" />

    The default settings of the ASPNET caching provider are that it caches the browser type also. However it easily configurable from the Global.asax file. You can even add your own variable to the cache key. For more information on this please take a look at the following blog post: Implement caching by domain name.

    All the best,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
3 posts, 0 answered