Google Drive File Stream<\/a> is a compelling option among cloud storage services – as the name implies, it does not store all<\/em> your files physically on your disk, but rather, it streams<\/em> them. While technically this is somewhat true, there is a catch here: a local cache is built to speed things up (and save bandwidth on both ends).<\/p>\n\n\n\n
Problem is, the cache size<\/strong> configuration is not behaving as it should: there is a KB article that aims to tell you how to configure<\/a> the Google Drive File Stream cache policy, in reality it didn’t work me and neither did for a handful of other users. Depending on usage, the content_cache<\/strong> folder easily eats up anywhere between 40 to 110 gigabytes of storage.<\/p>\n\n\n\n
There already are a number of threads about this problem, click here to check the one I’ve posted to as well<\/a> – in the meantime, I’ve put together a small hack-ish solution to clear the cache on login which essentially means deleting the content_cache<\/code> folder within the user’s
Library\/Application Support\/Google\/DriveFS<\/code> using the default shell provided by macOS.<\/p>\n\n\n\n
Let’s get started!<\/p>\n\n\n\n
Creating the Apple Automator script<\/h4>\n\n\n\n- start the Automator<\/strong> app either via Launchpad<\/em>, Spotlight<\/em> or Finder > Applications<\/em><\/li>
- once it has started, select Application<\/strong> and click Choose<\/strong><\/li>
- in the top-left corner click on Library<\/strong> (if it is not already visible<\/li>
- select “Library”<\/strong> at the top of the tree list<\/li>
- search for “Run Shell Script<\/strong>” and add it via double-clicking<\/strong> on it<\/li>
- for Shell<\/strong> select \/bin\/sh<\/strong><\/li>
- put the following into the text field:
find ~\/Library\/Application\\ Support\/Google\/DriveFS -type d -exec test -e '{}'\/content_cache \\; -exec rm -rf {}\/content_cache \\;<\/code><\/li>
click on File > Save…<\/li>
set the File Format<\/strong> to Application<\/strong><\/li>
save it to your Home folder or iCloud Drive with a descriptive name, like “Clear Google File Stream Cache<\/strong>“<\/li><\/ol>\n\n\n\nAdding the cache cleaning script to the Login Items<\/h4>\n\n\n\n- open System Preferences<\/strong> > Users & Groups<\/strong><\/li>
- select your user on the left<\/li>
- switch to the Login Items<\/strong> tab on the right<\/li>
- click the “+” at the bottom of the list<\/li>
- select the Clear Google File Stream Cache<\/strong> script you’ve just saved<\/li>
- Done!<\/li><\/ol>\n\n\n\n
Now the Google Drive File Stream cache is cleared by removing the content_cache<\/code> directory every time during the user’s login.<\/p>\n","protected":false},"excerpt":{"rendered":"
I’m in a hurry! TL;DR? Download and unzip this Automator script to your Home dir (or iCloud Drive) open System Preferences > Users & Groups select your user on the left switch to Login Items on the right click the “+” at the bottom of the list select the Clear Google File Stream Cache script […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[34,17],"tags":[],"_links":{"self":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/483"}],"collection":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/comments?post=483"}],"version-history":[{"count":10,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/483\/revisions"}],"predecessor-version":[{"id":493,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/posts\/483\/revisions\/493"}],"wp:attachment":[{"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/media?parent=483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/categories?post=483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.gaborhargitai.hu\/wp-json\/wp\/v2\/tags?post=483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}