Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
vsn

Smaty cache takes too much SSD space for some modules

Question

Hi there, by analyzing space problems on my SSD hosting I found out that smary cache for two modules take almost 0,5 GB (...cache/smarty/cache). They are crosselling and productcategory. The folders are full with single directories and files. Why they are so huge? Any possibility to turn off smarty cache for this particular ones?

Thanks!

Sergey

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Its because that the module generates cache files for all different crossing selling options, basically one set of options per product. 500mb of space for a cache is not a lot. 

Share this post


Link to post
Share on other sites
  • 0

Ok, understood. How can I deactivate smarty cache for this module? Is it sufficient to add $smarty->caching = false to the respective template file? Or is there another place to control cache per module (I just want to deactivate cache for only this one module). Thanks!

Share this post


Link to post
Share on other sites
  • 0

If you really want to disable caching, then one would replace

return $this->display(__FILE__, 'productscategory.tpl', $this->getCacheId($cache_id));

with

return $this->display(__FILE__, 'productscategory.tpl');

Trick is to remove cache_id from display and it will not write caches. Do it in all places where you want to disable caches.

After doing so check if shop did not slow down.

Share this post


Link to post
Share on other sites
  • 0

Thanks! Works perfectly without any performance regressions!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×