Bridge package that auto-purges page-cache tags when entities implementing IdentityInterface are saved or deleted.
composer require marko/page-cache-entityuse Marko\Database\Entity\Entity;
use Marko\PageCache\Contracts\IdentityInterface;
class Product extends Entity implements IdentityInterface
{
public function getIdentities(): array
{
return ['products', "product-{$this->id}"];
}
}Saving or deleting the entity purges the listed cache tags automatically --- no extra wiring needed.
Full usage, API reference, and examples: marko/page-cache-entity