OS X 10.8 and later. Apple Music stores the audio files it plays in ~/Library/Caches/com.apple.iTunes/SubscriptionPlayCache/. This script will simply delete that folder.
The files in this folder are specially protected audio files that are downloaded and cached when you play a track from Apple Music on your Mac. They can't be user-played and are only useful to Apple Music, ostensibly so iTunes doesn't have to re-download them if they are played again. (This cache folder doesn't pertain to Radio music. Or to Apple Music you've added to your library for offline listening, the files of which are stored in your "iTunes Media" folder.)
Be sure to also see View Cached Music, a free app that lists track information about the Apple Music files cached on your computer.
About 1GB per 100 files or so.
Perhaps Also of Interest...
downloaded 32m 43s ago
Exports and then re-imports selected tracks' artwork
downloaded 44m 9s ago
Check scripts downloaded to your computer from dougscripts.com for latest version
downloaded 1h 5m 2s ago
Gather audio tracks whose files contain no artwork metadata
downloaded 1h 7m 6s ago
Applet assists with swapping, copying, appending data between track tags
downloaded 1h 13m 25s ago
Stop iTunes after current track is finished playing
downloaded 1h 17m 16s ago
Play the selected track and stop