/**
  * {@inheritdoc}
  */
 public function findMatching($route, $host)
 {
     if ($this->cache->contains($this->getCacheKey())) {
         return $this->cache->fetch($this->getCacheKey());
     }
     $rules = $this->ruleProvider->getRules();
     $this->cache->save($this->getCacheKey(), $rules, $this->ttl);
     return $rules;
 }
 /**
  * {@inheritdoc}
  */
 public function resolve(Request $request)
 {
     $host = $this->extractHost($request);
     $route = $this->extractRoute($request);
     try {
         return $this->ruleProvider->findMatching($route, $host)->getTags();
     } catch (RuleNotFoundException $e) {
         return [];
     }
 }