CodeIgniter Forums
Cache folder gets huge after few hours - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: Cache folder gets huge after few hours (/thread-68905.html)



Cache folder gets huge after few hours - misterbirra - 09-12-2017

Hello, I can't really understand how the /cache folder works... because it gets extremely huge (I'm talking about 200.000 files) in few hours, even if I've disabled it by placingĀ 
Code:
$this->output->cache(0);
in all my controllders' constructors.
Is there something else I must do to prevent all of those files to be created?
The best thing to start would be to totally disable it. Thank you!


RE: Cache folder gets huge after few hours - dave friend - 09-12-2017

If you don't want the controller to cache the page then do not include a call to output->cache. Any existing cache files for that page will eventually be deleted after they expire.

Yes, calling
$this->output->cache(0);
has the same effect. But why waste time making a call that has no impact?

I am curious how you end up with such a huge number of files. Do your page requests utilize query strings and, if so, are there a lot of different query strings?