CodeIgniter Forums
Database Caching problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Database Caching problem (/thread-26145.html)



Database Caching problem - El Forum - 01-07-2010

[eluser]Kriesi[/eluser]
Hey everyone, I got a strange problem concerning Database caching:

My config looks like this:
Code:
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "system/cache/";

When caching is turned off
Code:
$db['default']['cache_on'] = FALSE;
I can see in the debuging information that the query is sent, but it doesnt return any values, allthough it should. When I use my mysql tool and send that query by hand I get data as expected. This behaviour is the same whether the caching folder is empty or not...

The funny thing: when I turn caching on
Code:
$db['default']['cache_on'] = TRUE;
the same query is sent (at least once when the cache folder is empty) and I get data as expected. I ve already checked my code and have never activated or deactivated caching at any other point of the script...

I am using the active record database class to send my queries, dont know if thats important...

My problem is that I need it to work with caching turned off...

Any suggestions?