Disable caching for MVC widget (OutputCacheAttribute doesn't work)
Hello,
I've created a login widget that displays the username of logged in user or just "Login" if the user is not logged in.
The problem is that event with:
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
the widget display sometimes the username of someone else or displays the right username but the user is not logged in anymore.
I also enabled "No Caching" under "System -> Output Cache Settings -> Output Cache Profiles" but with the same result.
We're running Sitefinity 6.1.4300.0 Small Business Edition on Windows Server 2012.
Hi,
The problem where caching settings are not applied for MVC enabled pages is a bug which is fixed in sitefinity 6.1.4700 version of sitefintiy 6.1 to make use of the fix please upgrade to this version.
Regards,
Stanislav Velikov
Telerik
I'm on version 9.1 and the output cache is still not working on my controller action method:
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
Is this supposed to work now?
Any news regarding this topic?
I'm also interested for 9.1 as well ass 8.2.
I had a problem in Sitefinity 9 that I thought was output caching related, and ended up being tied to the new mvc view compilation in version 9. MVC views are now compiled during the build process, meaning client side code changes (razor, inline js) don't show up until the application is re-compiled. I initially thought it was just a caching issue, but after doing everything I could think of to disable caching it was still occurring. The problem was eventually resolved by commenting out the lines in the csproj file which caused the views to be compiled during the build process:
<Import Project="Build\FeatherPrecompilation.targets" />
<Import Project="Build\RazorGenerator.MsBuild\build\RazorGenerator.MsBuild.targets" />
We're also running version 9.1 and have also created an mvc widget to show the login status. As the others have already said the OutputCache setting has no effect on caching.
Is there a workaround for this yet? If not we'll have to go back to a web forms control...