code: protected function exists($key)
      {
          return isset($this->cache[$key]) && in_array($this->cache[$key]['state'], [self::STATE_ALIGNED, self::STATE_PENDING_WRITE]);
      }
docs: Checks if a dataset exists for the provided key.
  
  @param string $key
  @return bool