When you stream music using Apple Music, iTunes caches files on your computer. It does so for a couple of reasons. First, it’s not streaming “live;” it downloads the entire track you’re listening to, and plays it. Second, it probably holds onto the files so, if you play them again, it can play them more efficiently.
On Macs, iTunes stores caches in the hidden Library folder that’s inside your home folder (the one with the house icon and your user name). If you haven’t un-hidden that folder, you can view it in the Finder by pressing the Option key, and choosing Library from the Go menu.
Once you’re there, go to the Caches folder, then com.apple.itunes. (The full path is ~/Library/Caches/com.apple.itunes.) You’ll see something like this:
On Windows, it’s (replace USERNAME with you user name):
The SubscriptionPlayCache is the folder that contains the actual music files, and fsCachedData contains album artwork. The artwork folder seems larger than it should be; it contains artwork cached from the For You section, as well as for music I’ve streamed.
Right now, I haven’t been using Apple Music a lot, and my folder is about 740 MB. I don’t know how much iTunes will hold on to, but conceivably this folder could get a lot bigger.
If you need to reclaim space, you could delete the entire folder, if you wish. Quit and re-launch iTunes so it sees that the folder is missing and recreates it.
To clear the cache on iOS, go to Settings > Music, and toggle off iCloud Music Library. Wait a couple of minutes, then turn it on again. This should clear the cache.
I’m curious; how big is your cache folder? iTunes certainly checks how much free space is on the disk it uses, so it shouldn’t let the folder get too big, but I wouldn’t be surprised that, if you use Apple Music a lot, it could take up several GB. There’s no option to choose how much space iTunes can use for its cache.
I see that one user on Apple’s support forums reported that his cache ballooned to 17 GB, leaving him with only 100 MB disk space. Wow.