CacheManager improvements.

Added a global version feature and made url preparation more extendable.