Extracted caching into it's own module