Added automatic deleting of invalid entries. Added tests to cover this.
Fixed abstract persisting cache to delete file system entries on the fly.