Welcome Guest, Not a member yet? Register   Sign In
how to: conditonal config
#6

(This post was last modified: 11-23-2015, 08:37 PM by starchild.)

*sigh* this is hurting my head.

I'm able to set cache path, but the problem now is that the session seems to be cached itself!
As soon as user logs in and caches the page to the assigned dir, even if I log out again, I'm still getting the logged in cache files being returned.

eg:

PHP Code:
$cust_id $this->session->userdata('cust_id');
        if (!isset(
$cust_id) || $cust_id <=) {
        
$this->config->set_item("cache_path","/path/to/application/cache3/") ;
        } else {
        
$this->config->set_item("cache_path","/path/to/application/cache2/");
        }
        
$this->output->cache(90); 

I guess the solution lies in environments, but how to assign an environment based on session data?  It all seems to be like a chicken and egg situation.
Reply


Messages In This Thread
how to: conditonal config - by starchild - 11-08-2015, 04:08 PM
RE: how to: conditonal config - by sintakonte - 11-09-2015, 05:04 AM
RE: how to: conditonal config - by starchild - 11-09-2015, 05:07 AM
RE: how to: conditonal config - by starchild - 11-11-2015, 08:24 PM
RE: how to: conditonal config - by mwhitney - 11-13-2015, 08:54 AM
RE: how to: conditonal config - by starchild - 11-23-2015, 08:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB