Welcome Guest, Not a member yet? Register   Sign In
SQL_CACH with CI DB active_record helpers
#1

[eluser]dreamynsx[/eluser]
okay so:

$query = $this->db->get('mytable');

// Produces: SELECT * FROM mytable


Now, with Mysql query cache mechanism, type set to 2,
you can define which queries are to be inserted into the cache
by placing 'SQL_CACHE' right after the 'SELECT', like this:

$sql = "SELECT SQL_CACHE FROM mytable"

Does CI's active_record db helpers support this ability?

Or we have to build the query manually using the db->query like...
$this->db->query($sql);
#2

[eluser]Michael Wales[/eluser]
CodeIgniter implements it's own version of query caching. If you would like to use SQL_CACHE you will need to manually build your queries.

CI Database Caching




Theme © iAndrew 2016 - Forum software by © MyBB