Welcome Guest, Not a member yet? Register   Sign In
codeigniter caching
#1

[eluser]Unknown[/eluser]
Apologies is my question is a bit of a novice one but I'm just a bit unsure about caching. I've just started looking into caching in Codeigniter and have noticed that there seems to be two type of caching. Web page caching and database caching.

If I use the line

Code:
$this->output->cache(30);

in my controller function does this mean that only the text and images etc on this page will be cached and not the database queries? So if the database was the change and this page was cached it would bring through up to date data?

Thanks for any help
#2

[eluser]CroNiX[/eluser]
It won't run the queries if the cache data is still within the cache time. It will just straight up output the cached file and won't even run the controller. If the cache is outdated, it will run the entire controller (with queries/etc) and cache that new output.




Theme © iAndrew 2016 - Forum software by © MyBB