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
935 Views Asked by drogon At
1
There are 1 best solutions below
Related Questions in SITEFINITY
- Sitefinity- Change template of a group page or redirection page
- Sitefinity - C# - Fetch user email and output it in a div
- Solr fq (Filter Query) parameter in Sitefinity CMS
- "Sitefinity Renderer Layout was created successfully" prompts but files are not added in project - [Sitefinity]
- Error [Sitefinity Nuget] Unable to load the service index for source [Progress Sitefinity]
- Control Sitefinity Cookie (Persionalization (sf-prs-ss, sf-prs-lu, sf-prs-vp, sf-prs-vu), sf-data-intell-subject)
- Sitefinity sf-html-field.sf-cshtml File
- SolrNet retrieving a field value in Sitefinity MVC view
- Sitefinity 14.4 MVC - Multiple CTA Link List Using Autogenerated Field for Designer View
- Regex expression to replace special characters except first and last character found
- How to change the default path of Sitefinity media/images/
- Sitefinity: How to turn on/off sf-trckngckie cookie?
- Unlock shared content blocks in Sitefinity API
- How to render aria-label in sitefinity webform widget
- How can you access SiteFinity DigitalConfig variables on a SiteFinity page?
Related Questions in SITEFINITY-FEATHER
- Sitefinity - AutoGenerated Fields - Not persisting values
- How do I use the sitefinity dynamic content controller?
- SiteFinity- Included Captcha Form Widget does not contain alt tag
- Not able to login to sitefinity backend when restoring a copy of its database on a local computer
- Sitefinity Decompiling Telerik.Sitefinity.Frontend.Lists Dll causing errors
- Could not find the sitemap node with URL '/login' in sitefinity
- Sitefinity Custom Widget - deploying external assembly
- Sitefinity - Get Sub Library Name List Template
- Sitefinity 11 Ecomerce Widget is not displaying in right section of page content
- Sitefinity personalization by Time of Day not working on IIS
- Display module fields in Sitefinity using conditions in the back end
- sitefinity 10 upgrade - Chrome not allowing edit of Content blocks
- Saving Sitefinity Forms Module Data to separate Database
- Sitefinity 9.2 MVC 5 Feather and Ninject - Error loading module, another module with the same name has already been loaded
- After creating form in sitefinity facing issue : Uncaught TypeError: Cannot read property 'querySelectorAll' of undefined
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 # Hahtags
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