lib/Auth/Acl.php
public function getRules($useCache = true)
    {
        if (!$useCache) { //  || env('APP_ENV') !== 'production'
            return $this->loadRules();
        }
        if ($this->aclRulesCache === null) {
            $hash = sha1(serialize($this->config));
            $key = md5(__CLASS__.__FUNCTION__);
            $value = Cache::get($key, false);
            if ($value === false || $value['hash'] !== $hash) {
                $value = [
                    'hash' => $hash,
                    'acl' => $this->loadRules()
                ];
                Cache::forever($key, $value);
            }
            $this->aclRulesCache = $value['acl'];
        }
        return $this->aclRulesCache;
    }
public function getRules($useCache = true)
    {
        if (!$useCache) { //  || env('APP_ENV') !== 'production'
            return $this->loadRules();
        }
        if ($this->aclRulesCache === null) {
            $hash = sha1(serialize($this->config));
            $key = md5(__CLASS__.__FUNCTION__);
            $value = Cache::get($key, false);
            if ($value === false || $value['hash'] !== $hash) {
                $value = [
                    'hash' => $hash,
                    'acl' => $this->loadRules()
                ];
                Cache::forever($key, $value);
            }
            $this->aclRulesCache = $value['acl'];
        }
        return $this->aclRulesCache;
    }
public function getRules ( $ useCache = true ) { if ( ! $ useCache ) { //  || env('APP_ENV') !== 'production' return $ this -> loadRules ( ) ; } if ( $ this -> aclRulesCache === null ) { $ hash = sha1 ( serialize ( $ this -> config ) ) ; $ key = md5 ( __CLASS__ . __FUNCTION__ ) ; $ value = Cache :: get ( $ key , false ) ; if ( $ value === false || $ value [ 'hash' ] !== $ hash ) { $ value = [ 'hash' => $ hash , 'acl' => $ this -> loadRules ( ) ] ; Cache :: forever ( $ key , $ value ) ; } $ this -> aclRulesCache = $ value [ 'acl' ] ; } return $ this -> aclRulesCache ; }
Get the ACL object; use cache when possible

@param  boolean $useCache
@return AclRules
Get the ACL object ; use cache when possible