/**
  * @param $name
  *
  * @return Sidebar
  */
 public function resolve($name)
 {
     $duration = $this->config->get('sidebar.cache.duration');
     return $this->cache->remember(CacheKey::get($name), $duration, function () use($name) {
         return $this->resolver->resolve($name);
     });
 }
 /**
  * @param $name
  *
  * @return Sidebar
  */
 public function resolve($name)
 {
     if ((new SupportsCacheTags())->isSatisfiedBy($this->cache)) {
         $userId = $this->guard->check() ? $this->guard->user()->getAuthIdentifier() : null;
         $duration = $this->config->get('sidebar.cache.duration');
         return $this->cache->tags(CacheKey::get($name))->remember(CacheKey::get($name, $userId), $duration, function () use($name) {
             return $this->resolver->resolve($name);
         });
     }
 }
 /**
  * Flush
  *
  * @param $name
  */
 public function flush($name)
 {
     $this->cache->forget(CacheKey::get($name));
 }