1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Sitefinity Caching: Flush cache on content approval

Sitefinity Caching: Flush cache on content approval

4 posts, 0 answered
  1. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    05 Aug 2009
    Link to this post
    I'm not entirely sure how the underlying Sitefinity caching works, but each page seems to have it's own caching time and I'd like to know what this caching refers to. Is it client side caching or server side caching.

    Because of some performance issues we're experiencing with Sitefinity we decided to set the caching time for the home page to around 3 hours, but the problem came in where the company had to make a flash announcement and we weren't around to help them when they discovered that many of their users were not able to see the new content. I assume this is because of caching?

    Is there any configurability to the caching settings? I.e. set it to cache for X hours or until a new version of the page is published.

    If this is not a built in feature, does the extensibility in Sitefinity allow for this?

    Thanks,
    Jacques
  2. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    06 Aug 2009
    Link to this post
    Hi Jacques,

    I don't believe this is a caching problem, because even the cached page item has not expired, if the user publish the page, the cache item should be invalidated.
    The default Sitefinity page caching is based on the standard ASP.NET caching, and it is a server-side caching. You can globally define the default cache settings (duration and slidingExpiration) in the web.config:
        <telerik> 
        ... 
        <framework> 
                <caching defaultProvider="memoryCache"
                    <providers> 
                        <add name="memoryCache" type="Telerik.Caching.MemoryCachingProvider, Telerik.Framework"/> 
                        <add name="ASPNET" type="Telerik.Caching.AspNetCachingProvider, Telerik.Framework"  
                   duration="120"  
                   slidingExpiration="true"/> 
                    </providers> 
                    <cacheDependency mode="InMemory"/> 
                </caching> 
        ... 
            </framework> 
            <cms defaultProvider="Sitefinity" pageExtension=".aspx" ...> 
          <providers> 
            <clear /> 
            <add connectionStringName="DefaultConnection"  
                 cachingProviderName="ASPNET"  
                 name="Sitefinity" 
                 type="Telerik.Cms.Data.DefaultProvider, Telerik.Cms.Data" 
                 ... /> 
          </providers> 
          ... 
       ... 

    The user interface allows you to override these settings for specific pages.

    In case you are using web farm, or you have two (or more) applications pointing to one database, and you want that the changes made on the one application immediately appear in the others, you have to set the CacheDependency mode to InDatabase:
        ... 
        <framework> 
                <caching defaultProvider="memoryCache"
                    <providers> 
                        <add name="memoryCache" type="Telerik.Caching.MemoryCachingProvider, Telerik.Framework"/> 
                        <add name="ASPNET" type="Telerik.Caching.AspNetCachingProvider, Telerik.Framework"  
                   duration="120"  
                   slidingExpiration="true"/> 
                    </providers> 
                    <cacheDependency mode="InDatabase"/> 
                </caching> 
        ... 

    Could you please give us more details about your case?
    For example:
    Where have the changes made: in the page or in the module administration?
    What is the public control, which displays the dynamic data?


    Greetings,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    06 Aug 2009
    Link to this post
    Hi Vlad,

    We used the Generic Content for this and it was edited by editing the page then editing that particular Generic Content item on the page.

    Strangely enough the client reported that whilst they were having problems seeing these changes from within the company, many people who checked the content for them externally didn't have the problem at all.

    Internally the client only uses IE6.

    It's Sitefinity 3.6 running on Win Server 2003 Standard Edition off an Oracle back end.

    Regards,
    Jacques
  4. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    07 Aug 2009
    Link to this post
    Hi Jacques,

    It's very strange, I am not sure what could be the problem here, may by it is a browser caching  or an internal network issue. However, I don't believe it is a problem with the Sitefinity.

    Is it possible for you to create the following test?

    1. Create 3 pages:
      - Cms page with caching;
      - Cms page without caching;
      - Physical .aspx page;

    2. Open these 3 pages on IE6 on a computer in the company network;
    3. Modify the three pages;
    4. Finally open the pages on the same computer with the same browser, and check out which of the pages display the changes.

    Please do let us know about the result.

    Best wishes,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
4 posts, 0 answered