- Just an md5 of the cache key
- Therefore not possible to identify key name from file name - md5 is one way
- Level 1 - First 2 characters of filename
- Level 2 - Next 2 characters of filename
Get all cache items - http://stackoverflow.com/a/31791530
$storage = \Cache::getStore(); // will return instance of FileStore
$filesystem = $storage->getFilesystem(); // will return instance of Filesystem
$dir = (\Cache::getDirectory());
$keys = [];
foreach ($filesystem->allFiles($dir) as $file1) {
if (is_dir($file1->getPath())) {
foreach ($filesystem->allFiles($file1->getPath()) as $file2) {
$keys = array_merge($keys, [$file2->getRealpath() => unserialize(substr(\File::get($file2->getRealpath()), 10))]);
}
}
}