Welcome Guest, Not a member yet? Register   Sign In
Cache Problem
#1

[eluser]JingCleoVil[/eluser]
Hi,

I have a problem with $this->output->cache(n) regards with the logged and login box.

My Controller is
Code:
class Main extends Controller
{
    function Main()
    {
        parent::Controller();
        $this->load->model('user_model','user');
        $this->output->cache(10);
    }
    function index()
    {        
        if($this->user->isRestrict())
        {
            $this->load->view('logged');
        }
        else
        {
            $this->load->view('login');
        }
    }

$this->user->isRestrict() is just a boolean value.

Now here is the scenario when I log in I can logged in successfully but logging out its technically logged out but the logged.php view is still remain that means its being cached. Is there any way to not cached the loggin.php view after logging out? Or do I need to create a function delete cache file.

PS: The $this->output->cache(n) function whether I put it in the controller index or constructor controller same output no changes happen.




Theme © iAndrew 2016 - Forum software by © MyBB