Merge pull request #890 from drush-ops/library-caching

Enables caching for libraries.

Backport of #824 for `6.x`.