Welcome Guest, Not a member yet? Register   Sign In
Authentication on a hook
#10

[eluser]barbazul[/eluser]
Ok, I put some more energy into this (have to admit I wasn't thinking THAT hard) and got to the conclusion that the whole caching system is not entirely compatible with what you're trying to accomplish so that's where you should focus.

I think that in order to not to load the cache when post information is sent, the best solution is to extend the _display_cache method so you can check whether post information has been sent and if so, ignore the whole cache loading

system/application/libraries/MY_Cache.php
Code:
<?php
class MY_Cache extends Cache {
  function _display_cache(&$CFG, &$RTR) {
    if ( ! empty($_POST) ) { // Check if there is POST information
      return FALSE;
    } else {
      return parent::_display_cache($CFG,$RTR);
    }
  }
}
?>

If you do this, you should be able to fire your hook after the controller has been initialized


Messages In This Thread
Authentication on a hook - by El Forum - 03-31-2008, 08:23 AM
Authentication on a hook - by El Forum - 03-31-2008, 10:04 AM
Authentication on a hook - by El Forum - 03-31-2008, 11:25 AM
Authentication on a hook - by El Forum - 04-01-2008, 07:39 AM
Authentication on a hook - by El Forum - 04-01-2008, 09:09 AM
Authentication on a hook - by El Forum - 04-01-2008, 09:25 AM
Authentication on a hook - by El Forum - 04-01-2008, 10:21 AM
Authentication on a hook - by El Forum - 04-01-2008, 11:30 AM
Authentication on a hook - by El Forum - 04-01-2008, 12:11 PM
Authentication on a hook - by El Forum - 04-01-2008, 12:59 PM
Authentication on a hook - by El Forum - 04-01-2008, 01:27 PM
Authentication on a hook - by El Forum - 04-02-2008, 06:22 AM
Authentication on a hook - by El Forum - 04-02-2008, 07:16 AM
Authentication on a hook - by El Forum - 04-02-2008, 09:29 AM
Authentication on a hook - by El Forum - 04-02-2008, 11:07 AM
Authentication on a hook - by El Forum - 04-02-2008, 11:34 AM
Authentication on a hook - by El Forum - 04-03-2008, 06:46 AM
Authentication on a hook - by El Forum - 05-20-2009, 10:34 AM
Authentication on a hook - by El Forum - 05-20-2009, 12:31 PM
Authentication on a hook - by El Forum - 05-21-2009, 02:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB