src/Webiny/Hrc/Hrc.php
public function setCacheRules(array $cacheRules)
    {
        foreach ($cacheRules as $crName => $cr) {
            if (isset($cr['Ttl']) && isset($cr['Tags']) && isset($cr['Match'])) {
                $this->cacheRules[$crName] = new CacheRule($crName, $cr['Ttl'], $cr['Tags'], $cr['Match'], $cr);
            } else {
                throw new HrcException(sprintf('Unable to parse "%s" rule. The rule is missing a definition for one of these attributes: Ttl, Tags or Match',
                    $crName));
            }
        }
    }
public function setCacheRules(array $cacheRules)
    {
        foreach ($cacheRules as $crName => $cr) {
            if (isset($cr['Ttl']) && isset($cr['Tags']) && isset($cr['Match'])) {
                $this->cacheRules[$crName] = new CacheRule($crName, $cr['Ttl'], $cr['Tags'], $cr['Match'], $cr);
            } else {
                throw new HrcException(sprintf('Unable to parse "%s" rule. The rule is missing a definition for one of these attributes: Ttl, Tags or Match',
                    $crName));
            }
        }
    }
public function setCacheRules ( array $ cacheRules ) { foreach ( $ cacheRules as $ crName => $ cr ) { if ( isset ( $ cr [ 'Ttl' ] ) && isset ( $ cr [ 'Tags' ] ) && isset ( $ cr [ 'Match' ] ) ) { $ this -> cacheRules [ $ crName ] = new CacheRule ( $ crName , $ cr [ 'Ttl' ] , $ cr [ 'Tags' ] , $ cr [ 'Match' ] , $ cr ) ; } else { throw new HrcException ( sprintf ( 'Unable to parse "%s" rule. The rule is missing a definition for one of these attributes: Ttl, Tags or Match' , $ crName ) ) ; } } }
Overwrite the current cache rule list.

@param array $cacheRules

@throws HrcException
Overwrite the current cache rule list .