php - Session data not getting destroyed from cache in CodeIgniter -
i new codeigniter. in website have logout option. have written code destroy session , logout works first time in both ie , chrome. if login again logout not work till clear cache , manual refresh. both ie , chrome showing problem. have tried writing cache clear method not working. known issue or doing wrong. my logout code class logout extends ci_controller { public function __construct() { parent::__construct(); } function index() { $this->home_model->unsetsessions(); redirect('', 'refresh'); }} my home model function unsetsessions() { $newdata = array( 'session_id' => '', 'user_id' => 0, 'user_name' => null, 'user_type' => null ); $this->session->unset_userdata($newdata); }