Welcome Guest, Not a member yet? Register   Sign In
problem trying to cache certian queries?

ok in the database caching class it says to:
* Create a writable directory on your server where the cache files can be stored.
* Set the path to your cache folder in your application/config/database.php file.
* Enable the caching feature, either globally by setting the preference in your application/config/database.php file, or manually as described below.

so i use CI's cache folder (systems/cache) which is the default. and i enable the cache setting to the true in the db config.

however when i use these lines of code to select which queries i want to cache.
$obj_query = $this->db->query($str_sql);

it doesn't work....it just caches every query in my controller function being called?
i just want this one query to cached...not all of them.

if i disable the cache setting in the db config...then gets cached at all.

any help?

sorry, i have got it to work now.

i created the folder on my linux server with the root user and not apache...so my caches could never be written to the directory.

Theme © iAndrew 2016 - Forum software by © MyBB