How can I skip page caching when there's a session set? |
[eluser]emurad[/eluser]
Hello, I'm using CodeIgniter's Web Page Caching but I want to skip the cache when a session exists: if ($this->session->userdata('skip_caching')) How could I do that?
[eluser]WanWizard[/eluser]
Caching is dealt with at a very early stage, in the front controller. No CI facilities are available. You could store this value in a normal cookie, instead of in the session, and then use regular PHP code in the 'cache_override' hook to process it. If this hook returns anything else then FALSE, the cache file is ignored. |
Welcome Guest, Not a member yet? Register Sign In |