My service:
$di->set('viewCache', function() use ($config) {
$frontCache = new Phalcon\Cache\Frontend\Igbinary(array(
"lifetime" => $config->application->viewCacheLifeTime
));
$cache = new Phalcon\Cache\Backend\Memcache($frontCache, array(
"host" => "localhost",
"port" => "11211",
'persistent' => false
));
return $cache;
});
volt file:
{% cache "sidebar" %}
<a>generate this content is slow so we are going to cache it </a>
{% endcache %}
Controller file:
var_dump($this->viewCache->queryKeys());
die();
Error:
Phalcon\Cache\Exception: Cached keys need to be enabled to use this function (options['statsKey'] == '_PHCM')!
phalcon/cache/backend/memcache.zep (339)
on:
var_dump($this->viewCache->queryKeys());
Whats is the error?, please help!