Hi!

I'm just trying to cache the results of acl's check in the session. I
have written a new component, inheriting from DbAcl:

class CachedAclComponent extends DbAcl {
   
    function check($aro, $aco, $action = "*") {
        return parent::check($aro, $aco, $action);
        $key = 'CachedAcl.'.$aro.'.'.$aco.'.'.$action;
        if ($this->Session->check($key)) {
            return $this->Session->read($key);
        } else {
            $result = parent::check($aro, $aco, $action);
            $this->Session->write($key, $result);
            return $result;
        }
    }
}

and set in conf/core.php:

Configure::write('Acl.classname', 'Cached_Acl');

Acl now uses my check-methode. But there is one thing, that doesn't
work: The session! I can't find any way to write to the session in this
class. I've tried many things, but nothing worked for me! :-(

Bye
Marcus

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to