Guides
Tutorials
Configures cache HTTP headers for the current response.
class ApiPlatform\HttpCache\EventListener\AddHeadersListener
{
public __construct(bool $etag, null|int $maxAge, null|int $sharedMaxAge, null|array $vary, null|bool $public, null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, null|int $staleWhileRevalidate, null|int $staleIfError)
public onKernelResponse(Symfony\Component\HttpKernel\Event\ResponseEvent $event): null
}class ApiPlatform\HttpCache\EventListener\AddHeadersListener
{
public __construct(bool $etag, null|int $maxAge, null|int $sharedMaxAge, null|array $vary, null|bool $public, null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, null|int $staleWhileRevalidate, null|int $staleIfError)
public onKernelResponse(Symfony\Component\HttpKernel\Event\ResponseEvent $event): null
}public __construct(bool $etag, null|int $maxAge, null|int $sharedMaxAge, null|array $vary, null|bool $public, null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, null|int $staleWhileRevalidate, null|int $staleIfError)public __construct(bool $etag, null|int $maxAge, null|int $sharedMaxAge, null|array $vary, null|bool $public, null|ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, null|int $staleWhileRevalidate, null|int $staleIfError)| etag | bool | |
| maxAge | int | |
| sharedMaxAge | int | |
| vary | array | |
| public | bool | |
| resourceMetadataCollectionFactory | ApiPlatform\Metadata\Resource\Factory\ResourceMetadataCollectionFactoryInterface | |
| staleWhileRevalidate | int | |
| staleIfError | int |
public onKernelResponse(Symfony\Component\HttpKernel\Event\ResponseEvent $event): nullpublic onKernelResponse(Symfony\Component\HttpKernel\Event\ResponseEvent $event): null| event | Symfony\Component\HttpKernel\Event\ResponseEvent |
null