Implementing caching as separate functionality.