Implemented own caching to disk