Welcome Guest, Not a member yet? Register   Sign In
Problem with deleting particular cache
#1

[eluser]Unknown[/eluser]
Hello.

I have this model:
Code:
public function Vote($data) {
    $gameid = $this->input->post('gameid');
    $userid = $this->input->post('userid');
    $rate = $this->input->post('rate');

    $ins = array(
        'user_id' => $userid,
        'game_id' => $gameid,
        'rate' => $rate
    );

    $q = $this->db->insert('rates', $ins);

    $this->db->cache_delete('games',$gameid);
}
Which is pretty straight-forward, right? I turn cache on, but when I submit the form, I want it deleted. So I wrote cache_delete with controller 'games' and id brought from the hidden input. But it doesn't work. Using cache_delete_all works thought.

Inserting data in this model works aswell.




Theme © iAndrew 2016 - Forum software by © MyBB