0

If I activate the Codeigniter cache in the construct function of start controller (for example). So:

$this->output->cache(20); //20 minutes

If I do login in the principal page (built with Tank auth library) the complete web application is shown, if when I do logout, I reload the page , the complete web application is shown again. Why?

Obviously, This doesn't happen if the cache is disabled.

2 Answers 2

1

Codeigniter is caching the output of the first request. Any further requests will just return the cached page from the initial request.

As your app requires user state, you can't cache the entire page or all users will see the same thing (regardless of state).

2
1

If caching is enabled, you will always be taken page from cache, Until after 20 minutes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.