CMS page caching & authentication

edited June 2014 in Share
I've created a login system using Ion Auth and CI's controller hooks, together with Fuel's page variables in certain layouts. So a hook determines when a page variable requires a login for a CMS page, and Ion Auth authenticates.

In these layout views, there is a block that retrieves user data from the Ion Auth session data ("Welcome back... last login..." etc). Providing the CMS page is set not to be cached, this works OK. What I'd like to do is force "no cache" for layouts that are to be authenticated - I have 2 such - just in case the client forgets to do this when they create a new page with these layouts. Obviously, when the pages are cached, user data is stored and that's not good!

Is this possible? What's best practice for Fuel & authentication?


  • edited 2:34AM
    What if in your layout view file you specify the config value to FALSE like so:
    $this->fuel->set_config('use_page_cache', FALSE);
  • edited 2:34AM
Sign In or Register to comment.