I solved it like this.
I added another parameter to config
'settings' => [
'development' => TRUE,
]
Then I just check for the parameter where the view component is setup to disable the cache completly while in development mode
$di->setShared('view', function () {
$config = $this->getConfig();
$view = new View();
$view->setDI($this);
$view->setViewsDir($config->application->viewsDir);
$view->registerEngines([
'.volt' => function ($view) {
$config = $this->getConfig();
$volt = new VoltEngine($view, $this);
if($config->settings->development === false) {
$volt->setOptions([
'compiledPath' => $config->application->cacheDir,
'compiledSeparator' => '_',
'compileAlways' => true
]);
}
return $volt;
},
'.phtml' => PhpEngine::class // php >= 5.5 only
//'.phtml' => 'Phalcon\Mvc\View\Engine\Php' // php <= php 5.4 work-around
]);
return $view;
});
Another solution is found here: https://forum.phalcon.io/discussion/1386/how-to-disable-cache-in-volt-when-development Where a person named Jason solved it by unlinking files and forcing volt to always compile the files