Merged the media cache provider from the dev branch. See issue #145