Release Notes – 4.1 SP 1
I'm running into a development headache.
I've used advanced settings to enable all of the "No Cache" settings and disable all of the caching, however, when I try modify a user control via Studio (running Cassini) it seems to cache my UserControl until I stop Cassini and restart it.
This greatly increases the time it takes for me to debug and build new functionality.
How can I force Sitefinity to only use the version of my UserControl that I am actively developing upon?
Caching is turned off by default for Administrators, in Sitefinity 4.2.Best wishes,
Just to clarify something, since it could be helpful for you:
So, at no point, does Sitefinity cache the <usercontrol>.ascx.cs file? Do you find that in your development of user controls you have to restart IIS/Cassini between saves of the codebehind in order to show a change?
If a page or a control is cached, this means that actually the page/control's markup is cached, but not the server side logic. This means that if you request a cached resource, Sitefinity/Asp.Net will give you back only the previously saved markup - it will not execute the code in the .cs , nor will process the control or page lifecycle.
Your project is opened as a web site, and there is nothing wrong in that. You can just refresh the page when you make changes, and you don't need to recompile.
What I'm saying is that, for some reason, I make a change to a code behind file, and after I save the file, My breakpoints are not hit, nor are my changes reflected in the markup that the web server emits. After a restart of IIS/Cassini, my changes are present. After I restart the web server, I can see my changes and my breakpoints are adhered to.
This is because the markup, the template is cached and the web server returns it when you request the URL. When you restart the server, the cache is invalidated, and the changes take effect. This is not an anomaly.
I just remember that, with Sitefinity 3.7 (and studio 2008), when I would make a change to C# code in code behind, the JIT compiler would pick up my changes on my next request for a page that contained my user control, this doesn't seem to be the case any more.
This means that the 3.7 page was not cached. 3.x had the cache disabled by default, while in 4.x the cache is enabled. If you disable the page cache on that particular page, you will see the same effect as in 3.x.