implemented on-disc caching