Cache class extracted from CacheableRequest

If two caches are opened using the same directory and items were added to either of them, they would be out of sync. The second cache written to disk would overwrite the first. To avoid this, there should only be one cache for each directory. This could have been done by keeping one CacheableRequest for each cache directory, but I thought it made more sense to keep a single Cache object for each directory instead.
Cache class extracted from CacheableRequest

If two caches are opened using the same directory and items were added to either of them, they would be out of sync. The second cache written to disk would overwrite the first. To avoid this, there should only be one cache for each directory. This could have been done by keeping one CacheableRequest for each cache directory, but I thought it made more sense to keep a single Cache object for each directory instead.