Disable Template Caching for Development in Opencart 3

Disable template caching for development in OpenCart 3

You might need to upgrade to a more recent version of OpenCart3 - the first one (3.0.0.0) didn't have a way of doing this in the GUI.

More recent versions, such as 3.0.2.0, have a gear on the admin dashboard. Click the gear and you get options to disable caching.

Sample Image

Disable image cache in OpenCart

The way you will need to do it is to use either HTTP_IMAGE or HTTPS_IMAGE depending on the ssl status. For the main image, it's pretty simple, you basically need to use

<?php echo HTTP_IMAGE . $product_info['image']; ?>

Disabling caching on the PHP Smarty templating engine?

If you want smarty to check, each time a template is used, if a new version of it exists (and re-compile it if it's the case), then you are probably looking for the $compile_check option.


While developping, you might also be interested by this one : $force_compile (quoting) :

This forces Smarty to (re)compile
templates on every invocation.

Slim + Twig - how to turn off Twig cache during development?

change "cache" to false.
Like this

$twig = new Twig_Environment($loader, array(
'cache' => false,
));


Related Topics



Leave a reply



Submit