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;
        }
    }