I config a cache dir like:
$di->set('viewCache', function () use ($config) {
$frontendOptions = array(
'lifetime' => $config->cache->html->lifetime
);
//Create a output cache
$frontCache = new FrontOutput($frontendOptions);
//Set the cache directory
$backendOptions = array(
'cacheDir' => $config->cache->html->dir
);
//Create the File backend
$cache = new \Phalcon\Cache\Backend\File($frontCache, $backendOptions);
return $cache;
});
but will be a lot of saved files in one directory. Need put them on sub dirs by the hash. For example: cacheDir/aa/ cacheDir/ab/ cacheDir/ac/ ...