Jump to content

What actually is $smarty->force_compile


Recommended Posts

Hi, I have went through the prestashop forums regarding $smarty->force_compile = false;
Could anybody explain me what the smarty.config.inc.php does and what are the advantages and disadvantages if I turn to flase in production.

Link to comment
Share on other sites

if you set it to false, smarty will manage a cache system and your site will load really really faster ! (on some "bad" hosting providers, time can change from 30 seconds a page to less than 1 second !!)

The inconvenience is that, if you often modify your template (.tpl files) changes are not loaded automatically when you put your file on your server, you have to empty the cache for this file.

That's all !

So my advice.... set it to false !

Link to comment
Share on other sites

i mean you have to search in the /tools/smarty/compile directory for files corresponding to the tpl you have modified.

Files name look like this : %^03C^03CD10BE%%product.tpl.php

So for example, if you do modification in the product.tpl, you have to search for files containing product.tpl in their name, and just delete them from the /compile directory. Then next time you will refresh the product page on your website, file will be created again by smarty with all your modifications (sometimes you get a blank page on the website when smarty compile the file for the first time, just refresh twice, and voila...)

Link to comment
Share on other sites

×
×
  • Create New...