src/Webiny/Hrc/Hrc.php
public function getCacheRule($name = null)
    {
        if (is_null($name)) {
            return $this->cacheRules;
        } else {
            foreach ($this->cacheRules as $r) {
                if ($r->getName() == $name) {
                    return $r;
                }
            }

            return false;
        }
    }
public function getCacheRule($name = null)
    {
        if (is_null($name)) {
            return $this->cacheRules;
        } else {
            foreach ($this->cacheRules as $r) {
                if ($r->getName() == $name) {
                    return $r;
                }
            }

            return false;
        }
    }
public function getCacheRule ( $ name = null ) { if ( is_null ( $ name ) ) { return $ this -> cacheRules ; } else { foreach ( $ this -> cacheRules as $ r ) { if ( $ r -> getName ( ) == $ name ) { return $ r ; } } return false ; } }
Get a specific cache rule, or all of them.

@param null|string $name If provided, only the matching rule will be returned.

@return bool|CacheRule
Get a specific cache rule or all of them .