Cache folder getting too big: how to empty it automatically?

    Jun 01 2016 | 10:25 pm
    I'm reading a bunch of mp3s via sfplay~, and I'm noticing that my hard drive space is getting low. Indeed, the Application Support/Cycling '74/Max 7/Cache is getting bigger, containing all the converted versions of the files I'm using. I'd definitely like to prevent this caching accumulation, without needing to delete files by hand. Is there any way I can do that? Even after a full Max and/or computer restart, the folder stays the same. I don't seem to find a way to empty it...
    Max 7.2.2, Mac OS X 10.10.5
    Thanks, Daniele Ghisi

    • Jun 17 2016 | 4:19 pm
      Bump... Nobody has a clue? This is really annoying...
    • Jun 17 2016 | 4:54 pm
      You can write a cron job that erases old stuff or a bash script on startup?
      I can do something like this on my machine, but be careful with what you're doing, because it really erases stuff:
      find "/Users/henszimmerman/Library/Application Support/Cycling '74/Max 7/Cache" -ctime +1 -print0 | xargs -0 rm
      Better dry run first, like
      find "/Users/YOUR USER NAME HERE/Library/Application Support/Cycling '74/Max 7/Cache" -ctime +1 -print0 | xargs -0 -n1
      Hens Zimmerman
    • Jun 17 2016 | 5:06 pm
      Hi Hens, and first of all thanks for the idea!
      Unfortunaely my issue is not just at startup. I'm working on huge mp3 database, and as soon as I read, say, even just 300 of them, this ends up taking ~80GB space. The issue is at runtime! :) At the moment I'm using script similar to yours, yet triggered "manually" with a [shell] object. That's not ideal, but it's a workaround. I was hoping there was somewhere a feature preventing the caching. Apparently that's not the case.
      However, I hope that this behavior will change in future version, since it is very annoying: I'm asking Max to play an MP3 and Max is 1) converting it (well... ok...), 2) storing it somewhere on the hard drive (...), 3) keeping it there FOREVER (and this is really awful).
      It would be cool to have *true* MP3 playback, no conversion/storage needed. Or at least, please put a way to automatically delete files after usage (e.g. whenever a new file is opened on the same sfplay~).
      Again, thanks for the script. d
    • Feb 04 2017 | 3:56 pm
      I am also coming up on this problem - reading lots of MP3 files and having my hard drive fill up completely.. It would be extremely cool to at least have a way to set a maximum cache folder size or similar.
    • Feb 04 2017 | 4:21 pm
      Haven't tried it yet, but here: there something you could use (have a look especially at user Lari Hotari's answer). You could run this periodically from your patch using [shell].
    • Feb 05 2017 | 1:38 pm
      Is mp3 playback using movie object not applicable? There no conversion takes place, and so no caching.