code: public function isCacheable($namespace)
      {
          if (!$this->cacheOptions->isEnabled()) {
              return false;
          }
  
          $namespaces = $this->cacheOptions->getNamespaces();
          // user has enabled caching but has not specified namespaces to cache,
          // so we cache all the namespaces
          if (empty($namespaces)) {
              return true;
          }
  
          // user has enabled caching but has specified certain namespaces to cache,
          // so we cache only the specified namespaces
          return in_array($namespace, $namespaces);
      }
docs: Checks if settings of a namespace can be cached
  
  @param  string $namespace
  @return bool