Sitefinity MVC Feather Widgets - prevent caching
I'm using the feather package and building feather widgets for Sitefinity 9.1. I can't seem to override the Output Cache for the widgets using the OutputCache attribute: [OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]. I don't want to have to disable caching at the page level, just at the widget level. How do I disable caching at the widget level in Sitefinity?
Hi Adam, check out the Feather implementation for the login widget.
github.com/.../login-status.js
In my office, we've followed a similar pattern using client side javascript calls to actions with [Routes]. I've also seen various posts about implementing cache substitution, but from what I understand cache substitution becomes cumbersome when attempting to render entire razor views.
Hi Ryan. I don't think that Adam mean this one, he asked about servers side output caching.
I guess it is not possible to override Output Cache only for specific widget and keep cache for another parts of page because sitefinity is not pure asp.net mvc and it has many many wrappers outside of controller.
Yeah, client side code is not an option here, because the content from the widgets needs to be SEO friendly.
I ended up programatically clearing cache for pages instead. However, I still don't see updates when content related to dynamic modules is changed.
Could anyone point me to or add a sample for cache substitution in an mvc widget?