Blog

Enable and Flush Site Output Cache using PowerShell


by Tobias Lekman, 18 March, 2016

I had a requirement to enable the site output cache across all sites in our web application. I found an excellent script by Travis Smith called Set-SPSiteOutputCache. I downloaded that and simply put a loop wrapper around it. In my settings, I set the cache as Disabled for anonymous users and as Extranet for authenticated users.

Enable-SPSiteOutputCache.ps1

I also prepared a small script to flush the object cache in all sites as:

Flush-SPSiteOutputCache.ps1