Hello all.
I recently applied a cache to a slow performing page:
// My DI setup.
$di->set('modelsCache', function() use ($config) {
//Cache data for one day by default
$frontCache = new \Phalcon\Cache\Frontend\Data(array(
"lifetime" => 3600
));
// https://docs.phalcon.io/en/latest/reference/cache.html
$cache = new \Phalcon\Cache\Backend\File($frontCache, array(
"cacheDir" => $config->application->cacheDir,
));
return $cache;
});
// My find
$this->view->orders = Orders::find([
"status = 'complete'",
'order' => 'updated DESC',
'limit' => 300,
'cache' => ['lifetime' => 120, 'key' => 'archive-page']
]);
I have logged in to the server and run chmod 0777 and still no joy. My volt is working fine in that folder and $config->application->cacheDir
is also employed in the di setup. The cace is also working fine in my local WAMP; I can see a file name "archive-page" in my local cache folder. Anyone?