Moved caching to its own package