• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.