Welcome Guest, Not a member yet? Register   Sign In
flush_cache not working
#1

[eluser]Majd Taby[/eluser]
Hey guys, this has me stumped..I've never used flush_cache before and I can't figure out what's going on..

Here's the code:
Code:
$this->CI->db->where('field','value');
        $this->CI->db->flush_cache();
        $query = $this->CI->db->get_where('test',array(
                                          
                                         ));

Now when I run it, it prints out:

Code:
SELECT * FROM (`user_records`) WHERE `field` = 'value'

Notice how `field` = 'value' is in the WHERE clause, it's not flushing it...
#2

[eluser]Armchair Samurai[/eluser]
That looks like the expected output (except for the table). What result were you expecting?
#3

[eluser]Majd Taby[/eluser]
well, according to the user_guide, flush_cache is supposed to clear out the WHERE clause...
#4

[eluser]Derek Allard[/eluser]
flush_cache() should remove all items that were previously cached. In order for it to be used start_cache() and stop_cache() would have to already have been used.




Theme © iAndrew 2016 - Forum software by © MyBB