Split caching off to separate module