i'm working on a big project. i'm using codeigniter, but i'm facing a hard question, where should i using codeigniter caching. should i use it inside models? or in the controller? also as my project is big, i'm facing a hard time trying to guess what caches should i delete as the codeigniter caching is depending on the controller name, so when i update a table i have to check all controllers that are using that table and delete their cache. that kills me.
what is the best practice for this?
Thanks
CodeIgniter have a good cache for small projects, but when you need to exclude things, it gets kind of messy. It's not decentralized.
A good solution for query cache is http://code.google.com/p/improved-query-caching/ and as Wesley told you, http://philsturgeon.co.uk/code/codeigniter-cache.
I also don't recommend using the query cache for ALL your queries, but instead using the ones that really needs it. It depends a LOT in the project and its size.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With