private static function setCache(Cache &$cacheToChange = null, Cache $cache = null, $namespace = null)
    {
        if ($namespace === null) {
            $namespace = self::$cacheDefaultNamespace;
        }
        if (!is_string($namespace)) {
            throw new \InvalidArgumentException("The namespace must be a string.");
        }

        $cacheToChange = $cache;
        if ($cache !== null) {
            $cacheToChange->setNamespace($namespace);
        }
    }