The Robservatory

Robservations on everything…

 

When good cache goes bad…

OS X uses a multitude of cache files–as an example, my user’s Library/Caches folder contains 164 top-level items, most of which are folders containing more folders. In total, there’s presently 1.18GB of cached data, just for my user. Wow.

Most of the time, this is a Good Thing, as it makes the system more responsive, as it’s quicker to retrieve something from cache than to calculate or redownload it. However, it can also be troublesome at times. Like this morning, in my case.

I fired up Mail, and despite the fact that it was running perfectly last night, it was glacial. Folders took multiple minutes to open. Moving a message was a 15 minute process, if it worked at all. Even worse, though, was that when Mail was having its fits, the Finder was completely unresponsive. I could click on some folders, but others would bring the Finder to the land of permanent spinning rainbows. Trying to mount a disk image resulted in more spinning rainbows.

So I restarted, and tried again–it had been quite a while since the last restart. But I had the exact same symptoms. Unresponsive Mail and flakey Finder. I spent a few minutes trying to figure out if I’d changed anything or not, even though I was positive I hadn’t touched the system while sleeping :).

Then, after another restart and repeat of issues, I thought I’d try deleting Mail’s cache folders. Inside my user’s Library/Caches folder, I opened the Mail folder and deleted everything, then emptied the trash. Launched Mail again, and…voila, it was perfect! Speedy as its ever been, and the Finder didn’t have fits while Mail was running. Everything was basically back to normal–all because I deleted a series of temporary files that are supposed to do nothing more than make data access quicker. Go figure!

This is the first real cache trouble I’ve had on OS X, but it is a relatively common source of issues for others. Since cache folders exist in many spots (your user, the top-level Library folder, and the System folder), you might want to look into one of the cache cleaners, such as Cache Out X or Tiger Cache Cleaner (among many others), to make the job simpler.

I think I may add a general cache emptying routine to my crontab, just to make sure it happens somewhat regularly, given how much trouble this one incident caused.

6 Comments

Add a Comment
  1. 1,46 GB here:-O Wow. Deleting now, haven’t done that in quite some time. (GB of Adobe Camera Raw and 270 MB of Google Earth DB)

  2. The thing is, some of those caches are pretty useful. The Metadata folder, for example, is used for Spotlight searches, and I’m not sure that Spotlight recreates it unless you reindex your drive. Personally, I don’t think it’s a good idea to have that folder there – it should probably be in Application Support – but Apple does make some strange choices with what they put where in ~/Library.

    As for Google Earth and QuickTime, these are things you can adjust in the programs’ prefs. Some other programs give you these options as well. But, all in all, you can safely delete much of what’s there.

  3. You may want to run a disk utility to see if you have any problem sectors. It could be that the cache grew into a wonky area of the disk… Just an idea.

  4. Looking at the contents of some of those Mail.app cache files seems to indicate that they are related to the images that come in HTML-format messages.
    I have “display remote images in HTML messages” turned off in Mail.app preferences, so I don’t usually see such images unless I press the button “Load Images”.

    The delay that Rob experienced might be due to Mail.app trying to update these images over the network for some reason.
    Finder will often beachball if there is a network problem, so that might be the connection.

  5. You could also try Applejack. Excellent free software that does disk repair, repairs permissions, cache cleaning, etc.

    Yours sincerely,

    John Davis

Leave a Reply

The Robservatory © 2018 • Privacy Policy Built from the Frontier theme