Welcome Guest, Not a member yet? Register   Sign In
How can I skip page caching when there's a session set?
#1

[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?
#2

[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.




Theme © iAndrew 2016 - Forum software by © MyBB