Welcome Guest, Not a member yet? Register   Sign In
Why query cache do not work?
#1

(This post was last modified: 09-12-2015, 05:48 AM by StratoKyke.)

"Configured database connection has cache enabled. Aborting."
This is my problem.

I use this guide http://www.codeigniter.com/user_guide/da...ching.html for set the query cache and this is my database.php

Code:
$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
    'dsn'    => '',
    'hostname' => 'localhost',
    'username' => '',
    'password' => '',
    'database' => '',
    'port' => '3306',
    'dbdriver' => 'mysqli',
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' => FALSE,
    'cache_on' => TRUE,
    'cachedir' => 'application/cache/site',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => TRUE,
    'compress' => TRUE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => FALSE
);

The cache/site is writable...
I would not know what might depend.


Thanks for your reply Smile
Reply
#2

How I can fix?
Reply
#3

Did you try giving it a username, password and database name?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

You can't use the database driver for sessions on a database connection which has the cache enabled. So, you would either need to configure a second database connection with cache enabled to be used by the rest of your application, or selectively enable query caching when you want to use it, using $this->db->cache_on() / $this->db->cache_off().
Reply
#5

(This post was last modified: 09-14-2015, 10:29 AM by StratoKyke.)

(09-13-2015, 02:11 PM)InsiteFX Wrote: Did you try giving it a username, password and database name?

Obviously, the data have been removed ahah

(09-14-2015, 09:21 AM)mwhitney Wrote: You can't use the database driver for sessions on a database connection which has the cache enabled. So, you would either need to configure a second database connection with cache enabled to be used by the rest of your application, or selectively enable query caching when you want to use it, using $this->db->cache_on() / $this->db->cache_off().

Thanks for the reply Wink  I'll try to use cache_on and cache_off Wink
Reply




Theme © iAndrew 2016 - Forum software by © MyBB