"Automatically Cache" in Google Play Music. What exactly does it do?

I just keep wondering what the setting "Automatically cache" in Google Play Music actually does.

It says that it caches music while charging and in Wi-Fi, but what exactly is it caching? Is it the latest albums added to my library? Is it some random music based on Feel Lucky?

While thinking about this, I wonder if what it caches is the current play list, so instead of just caching while streaming, it caches the next few songs in advance.