Restoring a content database from a production environment to a development machine for dev purposes can sometimes get a little bit interesting.
Our production environments generally have output caching enabled for performance reasons(see /_Layouts/sitecachesettings.aspx in your own environment) but developing or troubleshooting an issue in dev normally requires output caching be disabled to you can view the results of your work. Of course the output cache settings are stored within the site collection so using a production backup will normally bring the output cache setting along with everything else.
write-host "User must be a site collection administrator or have full control within web application policy!"
The script takes a single named parameter (Url) which specifies the site collection URL. As you can see, I'm working with the SiteCacheSettingsWriter class to set the EnableCache property to false before sending through an Update() command; of course the same thing can easily be accomplished in C#.
powershell "& ./DisableOutputCache.ps1 -Url http://dev-moss"
I've parameterised this script since I restore content databases from multiple sites and didn't want the URL hard-coded.
As per my note, the account used to execute this script must be a site collection owner or have rights configured the web application policy or you'll encounter an access denied error.