Skip to main content

Fixing the Microsoft Office Document/File Cache and making backups quicker and smaller

Thread needs solution

My main Windows 10 PC runs Microsoft Office 2013, OneDrive, and the Office Upload Center. In such a configuration the Microsoft Office file cache can grow to be HUGE, tens of thousands of files occupying tens of gigabytes (there are many complaints in Windows support forums about this profligate usage of disk space). On my PC the Office file cache contained over 25,000 .FSF and .FSD files totaling in excess of 4GB. Here's what I found when I looked into the matter and what I did as a result:

  1. The Office file cache (OFC) was located on my system drive at C:\Users\{username}\AppData\Local\Microsoft\Office\15.0\OfficeFileCache.
  2. The entirety of the contents of the Office file cache can be deleted without ill effect. It automatically gets rebuilt after a boot, so if you don’t move the OFC off the system drive (see below), your disk imaging script or batch file could incorporate terminating OneDrive and the Office Upload Center (OUC), emptying the cache, and imaging the disk with proportionally less data to backup than previously.
  3. In Settings/Cache Settings in the OUC I changed the "Days to keep files in the Office Document Cache" to 1, and checked "Delete files from the Office Document Cache when they are closed." I also clicked the "Delete cached files" box, but several thousand files remained in the OFC after I'd done this.
  4. My PC's system drive (C:) is an 1TB SSD. I also have an 120GB SSD (D:) I use as a work drive for video encoding and on which I've placed a second page file. I image only the system drive, so I looked into moving the OFC off the system drive to the work drive and never having to concern myself with OFC space usage again. I succeeded in doing this by performing the registry hack documented at Step 2 of the instructions provided at http://ridilabs.net/post/2014/10/22/OneDrive-for-Business-Consumes-a-lo….
  5. I deleted the contents of the OFC from my system drive, made the registry change, rebooted, and watched as the OFC was rebuilt on the work drive.
  6. At the end of this process the OFC is no longer on the system drive -- which means quicker and smaller backups -- and the OFC on the work drive now contains slightly under 9,000 files and takes up 1.44GB of storage.
0 Users found this helpful

Thanks for sharing this information which may be helpful to other users if their backup sizes are being bloated by this type of cache file storage.

An alternative, of course, is to use a different Office product such as LibreOffice where I have not encountered this type of cache growth or explosion, but I recognise that this may not be possible for some users, especially those in business environments.

Of course, if you don't want to bother adjusting the size or location of your OFC, you can always exclude C:\Users\{username}\AppData\Local\Microsoft\Office\15.0\OfficeFileCache from being backed up. It doesn't contain anything of interest and can get to be very large.

Sounds sensible, if only these cache paths were hidden so deeply, but again thanks for sharing the tip.

Perhaps this doesn't exist in Office 2016 anymore, or not using One Drive may prevent this as well?  I'm doing both and there's only one very small cache folder

%localappdata%\Microsoft\Office\16.0\WebServiceCache 

Either way, thanks for the tip for finding other unnecssary files to backup and/or exclude.  

I also junction my Outlook folder and iTunes "backup" folders to other disks as they get out of hand too and neither is really important for me for an OS restore. I back those junctioned locaitons up separately (but rarely) with a different file/folder backup task.  I also find that having this junction, makes it easy to resore my iTunes database on a rebuild, by just creating the juntcion again.

 

mklink /J "%APPDATA%\Apple Computer\MobileSync" "D:\05)_MobileSync"

mklink /J "C:\Users\username\Music\iTunes" "D:\06)_iTunes"

mklink /J "%LOCALAPPDATA%\Microsoft\Outlook" "D:\07)_Outlook"

The Gold Tooth, thank you for sharing your experience with others and taking the time to describe the recommendation in details. I have passed it over to the program managers. Maybe we will add Office cache folders to the default backup exclusions!

Regards,

Slava

In reply to by truwrikodrorow…

Of course, if you don't want to bother adjusting the size or location of your OFC, you can always exclude C:\Users\{username}\AppData\Local\Microsoft\Office\15.0\OfficeFileCache from being backed up.

Thanks for your help. I was unable to get the files to save on my SSD card. How can I exclude them from being backed up at all?

From the backup screen select Options, Advanced tab, Exclusions.  Click on the + sign and enter the file path.