osx - clear md5 cache on Mac

08
2014-07
  • barrrista

    I noticed that calculating the md5 sums, for large files, take much less time the second time you run the md5 command on them. Is there any way to clear the cache? I'm actually writing a parallel application that calculates many md5 sums and would like accurate measurements without caching.

  • Answers
  • Darth Android

    The speed is not from an md5 cache, but rather from the file itself being cached in unused memory. This is automatically kept up to date, and dumping the disk cache will only degrade your system performance.


  • Related Question

    osx - Clearing Cache in Mail on Snow Leopard
  • Gordon

    Can anyone tell me how to clear the cache in the Mail application on Snow Leopard?

    I noticed that it was automatically backing up my gmail messages so it ended up caching 11GB of emails even though that's more than my account.

    The only solution I seem to be able to find is to delete the files in /Users/me/Library/Mail/MyGmailAccount

    Is this the best solution or is there a better way?


  • Related Answers
  • 8088

    This assumes that you're using Gmail IMAP. Set Mail.app to not keep offline copies of messages. Mail -> Preferences. Accounts -> Gmail account -> Advanced Tab. Set "Keep copies of messages for offline viewing:" to "Don't keep copies of any messages."

    EDIT
    As per Steve Folly's comment, it's true that with that method, Spotlight would no longer be able to access those emails for searching within entire messages. If the 11 GB of your email is mostly due to a lot of attachments, another option would be to choose "All messages, but omit attachments" in that same dropdown box. That way it would cache the text portion of the mail and you would still be able to search through it.

    Gmail in Mail.app

  • Steve Folly

    Do you use IMAP or POP access to gmail? IMAP should sync local and server content (do Mailbox > Synchronize > [account] just to make sure). POP will make copies from server and accumulate mail locally (and delete from server after a while).

    If you don't want email locally, just delete it from within the Mail app.

  • ca_peterson

    The Mailbox > Rebuild option worked great on an IMAP connection that stopped showing my older local email. It's a low-impact first thing to try before you start deleting files.