this is a better solution to the previous committed fix. This solution works in all cases (even when not running tests) and makes it useable for other CacheFile classes as well. In addition it keeps the dependencies in the PersistenceCache class