Php Codeigniter-清除缓存查询更新

Php Codeigniter-清除缓存查询更新,php,codeigniter,caching,Php,Codeigniter,Caching,在我的代码中,我使用缓存查询来缓存信息行。示例:当成员登录时,我将缓存它。当用户更新时,它怎么能只更新帐户的文件?更多的例子是,我缓存$id=5,它将删除帐户的文件have$id=5 $this->db->cache_on(); $this->db->escape($id); $this->db->where("username", $id); $query = $this->db->get("unlock_user"); return $quer

在我的代码中,我使用缓存查询来缓存信息行。示例:当成员登录时,我将缓存它。当用户更新时,它怎么能只更新帐户的文件?更多的例子是,我缓存$id=5,它将删除帐户的文件have$id=5

$this->db->cache_on();
$this->db->escape($id);
$this->db->where("username", $id);
$query = $this->db->get("unlock_user");
return $query->row_array();

你是在问缓存失效吗?你能给我解释一下吗?我不知道缓存失效