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

compileAlways not working

Hi every body .

I have trying to disable cache mode on MVC phalcon application .

Did not get any work .

My site have 100 Post in hour . And its important to disable cache mode .

How can i solve this problem ?

here is my services.php code :

$config = $this->getConfig();

$view = new View();
$view->setDI($this);
$view->setViewsDir($config->application->viewsDir);

$view->registerEngines([
    '.volt' => function ($view) {

        $volt = new \Phalcon\Mvc\View\Engine\Volt($view, $this);
        $compiler = $volt->getCompiler();
        $compiler->addFunction('time', 'time');
        $compiler->addFunction('str_replace', 'str_replace');

        return $volt;
    },
    '.phtml' => PhpEngine::class

]);

return $view;
edited Jul '17

Why you want to disable it? It should be enabled on production. It's only caching of volt, like compiled form, if you will disable it then it will be compiled all the time, it's not really needed.

It has nothing to cache overall.