References PurgeHttpCacheListener
Reference
C
Class

ApiPlatform\Doctrine\EventListener\PurgeHttpCacheListener

Purges responses containing modified entities from the proxy cache.

class ApiPlatform\Doctrine\EventListener\PurgeHttpCacheListener
{
    public __construct($purger, `<a href="/docs/main/references/Api/IriConverterInterface">ApiPlatform\Metadata\IriConverterInterface</a>`|`<a href="/docs/main/references/Api/IriConverterInterface">ApiPlatform\Api\IriConverterInterface</a>` $iriConverter, `<a href="/docs/main/references/Api/ResourceClassResolverInterface">ApiPlatform\Metadata\ResourceClassResolverInterface</a>`|`<a href="/docs/main/references/Api/ResourceClassResolverInterface">ApiPlatform\Api\ResourceClassResolverInterface $resourceClassResolver, null|Symfony\Component\PropertyAccess\PropertyAccessorInterface $propertyAccessor)
    public preUpdate(Doctrine\ORM\Event\PreUpdateEventArgs $eventArgs): null
    public onFlush(Doctrine\ORM\Event\OnFlushEventArgs $eventArgs): null
    public postFlush(): null
}

Methods

__construct

Parameters

purger`ApiPlatform\HttpCache\PurgerInterface`
iriConverter`ApiPlatform\Metadata\IriConverterInterface`
`ApiPlatform\Api\IriConverterInterface`
resourceClassResolver`ApiPlatform\Metadata\ResourceClassResolverInterface`
`ApiPlatform\Api\ResourceClassResolverInterface`
propertyAccessorSymfony\Component\PropertyAccess\PropertyAccessorInterface

preUpdate

Collects tags from the previous and the current version of the updated entities to purge related documents.

public preUpdate(Doctrine\ORM\Event\PreUpdateEventArgs $eventArgs): null

Parameters

eventArgsDoctrine\ORM\Event\PreUpdateEventArgs

Returns

null

onFlush

Collects tags from inserted and deleted entities, including relations.

public onFlush(Doctrine\ORM\Event\OnFlushEventArgs $eventArgs): null

Parameters

eventArgsDoctrine\ORM\Event\OnFlushEventArgs

Returns

null

postFlush

Purges tags collected during this request, and clears the tag list.

public postFlush(): null

Returns

null

Made with love by

Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.

Learn more

Copyright © 2023 Kévin Dunglas

Sponsored by Les-Tilleuls.coop