We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon cache - ajax request

Hi evryone,

I have little problem with cache. When I'm using ajax requests in my ControllerBase I have:

if ($this->request->isAjax())
        $this->view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_ACTION_VIEW);

this view doesn't cache - why? When I remove render level evrythink is ok. In controller action I have:

    $this->view->cache(array(
        "lifetime" => 86400,        
        "key"  => $this->cache_index
    ));

May I "force" cache for render level?



1.8k

u can close this issue)