original_string: private function getCacheKey(?string $format, array $context)
      {
          foreach ($context[self::EXCLUDE_FROM_CACHE_KEY] ?? $this->defaultContext[self::EXCLUDE_FROM_CACHE_KEY] as $key) {
              unset($context[$key]);
          }
          unset($context[self::EXCLUDE_FROM_CACHE_KEY]);
          unset($context['cache_key']); // avoid artificially different keys
  
          try {
              return md5($format.serialize([
                  'context' => $context,
                  'ignored' => $this->ignoredAttributes,
                  'camelized' => $this->camelizedAttributes,
              ]));
          } catch (\Exception $exception) {
              // The context cannot be serialized, skip the cache
              return false;
          }
      }
code: private function getCacheKey(?string $format, array $context)
      {
          foreach ($context[self::EXCLUDE_FROM_CACHE_KEY] ?? $this->defaultContext[self::EXCLUDE_FROM_CACHE_KEY] as $key) {
              unset($context[$key]);
          }
          unset($context[self::EXCLUDE_FROM_CACHE_KEY]);
          unset($context['cache_key']); // avoid artificially different keys
  
          try {
              return md5($format.serialize([
                  'context' => $context,
                  'ignored' => $this->ignoredAttributes,
                  'camelized' => $this->camelizedAttributes,
              ]));
          } catch (\Exception $exception) {
              // The context cannot be serialized, skip the cache
              return false;
          }
      }
code_tokens: private function getCacheKey ( ? string $ format , array $ context ) { foreach ( $ context [ self :: EXCLUDE_FROM_CACHE_KEY ] ?? $ this -> defaultContext [ self :: EXCLUDE_FROM_CACHE_KEY ] as $ key ) { unset ( $ context [ $ key ] ) ; } unset ( $ context [ self :: EXCLUDE_FROM_CACHE_KEY ] ) ; unset ( $ context [ 'cache_key' ] ) ; // avoid artificially different keys try { return md5 ( $ format . serialize ( [ 'context' => $ context , 'ignored' => $ this -> ignoredAttributes , 'camelized' => $ this -> camelizedAttributes , ] ) ) ; } catch ( \ Exception $ exception ) { // The context cannot be serialized, skip the cache return false ; } }
docstring: Builds the cache key for the attributes cache.
  
  The key must be different for every option in the context that could change which attributes should be handled.
  
  @return bool|string
docstring_tokens: Builds the cache key for the attributes cache .