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; } }