Cache only \Phalcon\Mvc\View::LEVEL_ACTION_VIEW level

Hello, I would like to cache action lavele view of my page. In my controller I tried the following code :

    $exists = $this->view->getCache()->exists($cache_key);
    if (!$exists) {
    }
    $this->view->cache(array("lifetime" => 3600, "key" => $cache_key, "level" => \Phalcon\Mvc\View::LEVEL_ACTION_VIEW));

But still the entire page is cached completely with all layouts. I'm on Phalcon 2.0.10 Any Help appreciated !



1.2k

thx, but that method only work with output data and doesn't store the view of current action....

Check this - https://github.com/phalcon/cphalcon/issues/2377