MVC Widgets being cached, not showing changes after edit

Posted by Community Admin on 04-Aug-2018 02:33

MVC Widgets being cached, not showing changes after edit

All Replies

Posted by Community Admin on 12-Oct-2012 00:00

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?

Posted by Community Admin on 16-Oct-2012 00:00

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

Posted by Community Admin on 02-Mar-2013 00:00

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 

Posted by Community Admin on 06-Mar-2013 00:00

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

Posted by Community Admin on 06-Mar-2013 00:00

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

Posted by Community Admin on 11-Mar-2013 00:00

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

Posted by Community Admin on 01-Jul-2014 00:00

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.

This thread is closed