Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions http_cache/cache_invalidation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,22 @@ Then, register the class as a service that :doc:`decorates </service_container/s

.. configuration-block::

.. code-block:: php-attributes

// src/CacheKernel.php
namespace App;

// ...
use Symfony\Component\DependencyInjection\Attribute\AsDecorator;
use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;

#[Autoconfigure(bind: ['$surrogate' => '@?esi'])]
#[AsDecorator(decorates: 'http_cache')]
class CacheKernel extends HttpCache
{
// ...
}

.. code-block:: yaml

# config/services.yaml
Expand Down