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

Forums / Developing with Sitefinity / MVC Widgets being cached, not showing changes after edit

MVC Widgets being cached, not showing changes after edit

7 posts, 0 answered
  1. Bobby Ross
    Bobby Ross avatar
    14 posts
    Registered:
    02 Nov 2004
    12 Oct 2012
    Link to this post
    Is there an option to disable caching with MVC widgets?  If I edit an item in a simple form all previous views are cached based on the output cache settings specified under administration.  If I force controller authorization [Authorize] then this does not occur, otherwise I have to go into administration and disable output caching to get the result I am looking for. 
    I assume this has something to do with Hybrid mode pages render the MVC form using javascript instead of true forms.
    Is there a workaround for this?
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    02 Dec 2016
    16 Oct 2012
    Link to this post
    Hello Bobby,

    Thnak you for using our services.

    There is a known issue that we're working on - when creating a page template from Designer->Page Templates and from Advanced settings choose MVC Only, then creating a page based on this template, the No Cache option on the page does not work.
    It does not matter what you do, the cache is always on and it does not enter into default action after the first load.

    For the other modes (e.g. Hybrid like the one you're using), can you please try putting the

     [System.Web.Mvc.OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]

    attribute above your Controller class, and let us know if any issues persist?


    Regards,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Tim
    Tim avatar
    11 posts
    Registered:
    11 Nov 2012
    02 Mar 2013
    Link to this post

    I have tried this method and can confirm it doesn't work at all.
    Do you have any other suggestion?

    We need a method to disable caching for just the current mvc widget, not the rest of the page

    Tim 

  4. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    02 Dec 2016
    06 Mar 2013
    Link to this post
    Hi Tim,

    Currently there is an issue with disabling caching for MVC widgets in classic mode. The problem has been logged in our bug tracking system for fixing, and hopefully we'll be able to provide a fix for it in the upcoming releases.

    Please excuse us for the caused inconvenience.

    Regards,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Tim
    Tim avatar
    11 posts
    Registered:
    11 Nov 2012
    06 Mar 2013 in reply to Boyan Barnev
    Link to this post

    Hi Boyan,

    I don't believe we're in classic mode. We have multiple dynamic module widgets on the same page. 

     Pretty sure disabling caching of an mvc widget in hybrid mode dorsn't work. We're on SF 5.4

     

    Tim

  6. Patrick Dunn
    Patrick Dunn avatar
    237 posts
    Registered:
    03 Nov 2014
    11 Mar 2013
    Link to this post
    Hello,

    Thanks for your reply, Bobby.

    Could you open a support ticket and send us your project for testing? I'm not able to replicate this on a clean site. We'll be sure to update this forum thread when a solution is found for everyone.

    Thank you.


    Kind regards,
    Patrick Dunn
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Bo Chulindra
    Bo Chulindra avatar
    35 posts
    Registered:
    17 Dec 2013
    01 Jul 2014
    Link to this post

    I was having problems with the OutputCache attribute and got the following reply from support regarding its use:

     Unfortunately, the OutputCache attribute is not supported for MVC
    widgets, since in Sitefinity context, this default MVC attribute will
    force and invalidate the whole page, not only the container of the MVC
    widget. We have implemented a special controller proxy that should be
    used for this purpose, however, it is currently unavailable for use,
    because of a bug logged and described here. At this time, there is no workaround I can suggest to overcome this issue.

7 posts, 0 answered