Tuesday, September 3, 2013

How to Clear SharePoint Designer Cache

We face some Odd issue with SharePoint Designer: SPD shows files checked out already even though they weren't. While trying to check-in, SPD errored with "Cannot perform this operation. The file is no longer checked out or has been deleted."

Also experienced SharePoint designer crash unexpectedly some times and few lists no longer visible in the All Files! This is due to SharePoint Designer caches content (including assemblies and XML configuration files).

To fix these issues, we've to clear SharePoint designer cache. Here is how:

To clear SharePoint Designer 2010 / SharePoint Designer 2013 cache, Close SPD first, Go to these two locations from your client machine (if you are using SPD in client) and delete all files from them: (Go to Start >> Run >> Type these locations one by one)

  1. %APPDATA%\Microsoft\Web Server Extensions\Cache
  2. %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\
It applies for SharePoint designer 2007 as well. Automation? Sure, We can place a bunch of commands in a Batch file to do the above.

cd "%APPDATA%\Microsoft\Web Server Extensions\Cache"

del *.web /S /Q "%APPDATA%\Microsoft\Web Server Extensions\Cache"

cd "%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\"

rmdir /S /Q "%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\"

mkdir "%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache"


Clear SharePoint Designer Cache using PowerShell:
Well, That's a olden days method. Lets use PowerShell to make it efficient. PowerShell script to Clear SharePoint Designer Cache:
#Check if SharePoint Designer is running!

if(Get-Process 'SPDESIGN' -ea SilentlyContinue)
    "Please close SharePoint Designer before running this script!"

    if (Test-Path $Env:USERPROFILE"\AppData\Roaming\Microsoft\Web Server Extensions\Cache")
         Remove-Item $Env:USERPROFILE"\AppData\Roaming\Microsoft\Web Server Extensions\Cache" -force -recurse -ErrorAction SilentlyContinue
    if( test-path $Env:USERPROFILE"\AppData\Local\Microsoft\WebsiteCache")
         Remove-Item $Env:USERPROFILE"\AppData\Local\Microsoft\WebsiteCache" -force -recurse -ErrorAction SilentlyContinue
    Write-host "SharePoint Designer Cache Cleared!"
Disable SharePoint Designer Cache: 
To disable SharePoint designer cache, Open SharePoint Designer >> Options >> Click on General >> Application Options >> Uncheck "Cache site data across SharePoint designer Sessions" 

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...