3 namespace Drupal\serialization\Normalizer;
5 use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
8 * Defines the interface for normalizers producing cacheable normalizations.
12 interface CacheableNormalizerInterface extends NormalizerInterface {
15 * Name of key for bubbling cacheability metadata via serialization context.
17 * @see \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize()
18 * @see \Symfony\Component\Serializer\SerializerInterface::serialize()
19 * @see \Drupal\rest\EventSubscriber\ResourceResponseSubscriber::renderResponseBody()
21 const SERIALIZATION_CONTEXT_CACHEABILITY = 'cacheability';