Welcome Guest, Not a member yet? Register   Sign In
Caching Functions
#3

[eluser]Sumon[/eluser]
Function consists of database actions and some logic. You mostly intend to cache database (more specifically select statement). So as a result site will be faster. Now you might not need to cache every parts. So you can turn it off. For example

Code:
// Turn caching on
$this->db->cache_on();
$query = $this->db->query("SELECT * FROM mytable");

// Turn caching off for this one query
$this->db->cache_off();
$query = $this->db->query("SELECT * FROM members WHERE member_id = '$current_user'");

// Turn caching back on
$this->db->cache_on();
$query = $this->db->query("SELECT * FROM another_table");
You can find more detail in CI User Guide.
By the way, i am not sure my try helps you or not.


Messages In This Thread
Caching Functions - by El Forum - 09-08-2008, 10:32 AM
Caching Functions - by El Forum - 09-09-2008, 09:10 AM
Caching Functions - by El Forum - 09-09-2008, 09:38 AM
Caching Functions - by El Forum - 09-09-2008, 09:41 AM
Caching Functions - by El Forum - 09-09-2008, 10:49 AM
Caching Functions - by El Forum - 09-09-2008, 10:57 AM
Caching Functions - by El Forum - 09-09-2008, 11:14 AM
Caching Functions - by El Forum - 09-09-2008, 03:17 PM
Caching Functions - by El Forum - 09-09-2008, 08:30 PM
Caching Functions - by El Forum - 09-09-2008, 10:55 PM
Caching Functions - by El Forum - 09-10-2008, 09:01 AM
Caching Functions - by El Forum - 09-10-2008, 09:24 AM
Caching Functions - by El Forum - 09-10-2008, 09:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB