croc Posted June 22, 2015 Share Posted June 22, 2015 (edited) Hello All, I have one issue with prestashop 1.6.0.9. cache. I discovered that almost 80% of my products are not working (page is not loading just blank page) and that number was still higher and higher. (I have thousends of products) Then I deleted contents of folders: cache/smarty/cache and cache/smarty/compile I checked that most importanat folder to clear is cache/smarty/cache/blocktopmenu/ It helped and all worked right, but after time, all content of these folders was back and products did not work again. My question: How to set cache system right, to turn off automatical generating of cache files in those folders above? And is it ok to turn it off - or what for are these files/folder important? Thanks in advance Edited June 22, 2015 by croc (see edit history) Link to comment Share on other sites More sharing options...
Dh42 Posted June 23, 2015 Share Posted June 23, 2015 Is your server generating any error messages to the log files? Link to comment Share on other sites More sharing options...
croc Posted June 24, 2015 Author Share Posted June 24, 2015 Is your server generating any error messages to the log files? Hi Dh42, thanks for reply, I checked, but I found no errors about cache or any which would be important for this issue. I just discovered that after manual clearing of folders cache/smarty/cache and cache/smarty/compile their content was directly generated again in a while, so the problem with products pages nonloading was cyclic. In BO in preferences/performance/smarty i changed cache button to NO, and it seems that if helped coz links are working good. Was this step OK? How about compile settings in BO, which should i choose? Thanks Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 24, 2015 Share Posted June 24, 2015 (edited) Just a guess but ... Smarty creates sub directory's recursively by default, you may not have set write permissions to enable that. For example permissions/chmod to /cache/ directory recursively to 777. Alternatively you can turn off sub directory creation in config/smarty.config.inc.php Change: global $smarty; $smarty = new Smarty(); $smarty->setCompileDir(_PS_CACHE_DIR_.'smarty/compile'); $smarty->setCacheDir(_PS_CACHE_DIR_.'smarty/cache'); if (!Tools::getSafeModeStatus()) $smarty->use_sub_dirs = true; The last word true to false. Edited June 24, 2015 by Bill Dalton (see edit history) Link to comment Share on other sites More sharing options...
croc Posted June 24, 2015 Author Share Posted June 24, 2015 Hi, and if by this way, is there any disadvantage? I mean when I will turn off auto compile and cache. Thanks Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 24, 2015 Share Posted June 24, 2015 Do not turn off auto compile and cache. All I'm talking about is write permissions in sub directory's. Link to comment Share on other sites More sharing options...
croc Posted June 24, 2015 Author Share Posted June 24, 2015 Do not turn off auto compile and cache. All I'm talking about is write permissions in sub directory's. It means that cache button in BO preferences/performance/smarty should be set as YES? and just change permisions to 777 + change true to false ? Am I right? Thanks in advance Link to comment Share on other sites More sharing options...
Bill Dalton Posted June 24, 2015 Share Posted June 24, 2015 Yes, keep that on. I made two suggestions in my post #4. Both require working with the files/directory, not BO. Link to comment Share on other sites More sharing options...
croc Posted July 13, 2015 Author Share Posted July 13, 2015 Yes, keep that on. I made two suggestions in my post #4. Both require working with the files/directory, not BO. Hi Bill, so when i will it change to false, what will I reach? Will it stop to generate subdirectories in cahe and compile? I need any tip how to stop to generate them cause my server is still falling down after it reach files quota limit. In BO i turned cache button to NO, and cache folder is still empty (what for are those all folders and files?, are they important? ) now, just compile folder still generates folder and files.... Thanks Link to comment Share on other sites More sharing options...
Bill Dalton Posted July 13, 2015 Share Posted July 13, 2015 The problem you are having could be caused by any number of things. I just gave you a suggestion to try with the hope it might help. Good luck to you. Link to comment Share on other sites More sharing options...
Recommended Posts