ApiPlatform\Core\Hal\Serializer\ItemNormalizer::getHalCacheKey PHP Method

getHalCacheKey() private method

Gets the cache key to use.
private getHalCacheKey ( string $format = null, array $context ) : boolean | string
$format string
$context array
return boolean | string
    private function getHalCacheKey(string $format = null, array $context)
    {
        try {
            return md5($format . serialize($context));
        } catch (\Exception $exception) {
            // The context cannot be serialized, skip the cache
            return false;
        }
    }