private function getLocaleForCacheKey(string $locale = null): string
    {
        if ($locale) {
            return $locale;
        }

        return $this->getEnvironment()->getDefaultLocale()->getCode();
    }
private function getLocaleForCacheKey(string $locale = null): string
    {
        if ($locale) {
            return $locale;
        }

        return $this->getEnvironment()->getDefaultLocale()->getCode();
    }
Returns the locale to be used in a cache key.

@param string|null $locale

@return string