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?
Sitefinity MVC Feather Widgets - prevent caching
933 Views Asked by drogon At
1
There are 1 best solutions below
Related Questions in SITEFINITY
- Sitefinity Invalid Root
- Risks of AJAX calls to asmx
- Users don't load Sitefinity
- Restoring a sitefinity site from production to local
- Function Failed to load resource: Mvc
- .ToList on IQueryable causes NullReferenceException when executed in background
- How to implement private chat in sitefinity?
- Sitefinity CMS: Html.BeginFormSitefinity with external URL?
- Sitefinity - getting full URL from within MVC widget
- Sitefinity MVC External Authentication
- ViewStateException - Validation of viewstate MAC failed - Sitefinity ASP.NET MVC with Jquery Mobile
- Find URL scheme and hostname in Sitefinity controller
- sitefinity integration with existing mvc application
- Sitesync Sitefinity backend pages
- Querying items with multiple related data items (Sitefinity)
Related Questions in SITEFINITY-FEATHER
- What object type is used for a single related image property in Sitefinity?
- Saving Sitefinity Forms Module Data to separate Database
- Not able to login to sitefinity backend when restoring a copy of its database on a local computer
- Sitefinity - Get Sub Library Name List Template
- Sitefinity MVC Feather Widgets - prevent caching
- Sitefinity 11 Ecomerce Widget is not displaying in right section of page content
- Sitefinity 9.2 MVC 5 Feather and Ninject - Error loading module, another module with the same name has already been loaded
- Sitefinity personalization by Time of Day not working on IIS
- Sitefinity Decompiling Telerik.Sitefinity.Frontend.Lists Dll causing errors
- After creating form in sitefinity facing issue : Uncaught TypeError: Cannot read property 'querySelectorAll' of undefined
- How do I use the sitefinity dynamic content controller?
- Sitefinity - AutoGenerated Fields - Not persisting values
- Sitefinity Custom Fields for list widgets and how to use them in MVC view templates
- Display module fields in Sitefinity using conditions in the back end
- Matching selecting dynamic content Id to list of ItemViewModel in SiteFinity
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Better do it on the client-side, especially given that the Sitefinity's team is doing exactly that in the Login Status feather widget which should not be output cached:
The View contains two divs that are initially hidden and shown via javascript on the client depending on the status of the user (which is retrieved via web service):
https://github.com/Sitefinity/feather-widgets/blob/master/Telerik.Sitefinity.Frontend.Identity/Mvc/Views/LoginStatus/LoginStatus.LoginName.cshtml
The js code:
https://github.com/Sitefinity/feather-widgets/blob/master/Telerik.Sitefinity.Frontend.Identity/Mvc/Scripts/LoginStatus/login-status.js
EDIT: What you can try is to subscribe to the PageManager.Executing event and see if the page that was changed was your parent/group page. If so, then you can get all its child pages (PageData) with the API and increase their BuildStamp property with 1. This will invalidate their cache. More info here: http://docs.sitefinity.com/tutorial-subscribe-to-events-using-dataprovider-or-manager-class