A Symfony bundle for creating and sending cache purge requests to HTTP cache backends like Varnish.
- TODO
- PHP 8.1 or greater
- Symfony 5.4 or Symfony 6.4 or greater
-
Require the bundle with Composer:
composer require sofascore/purgatory-bundle
-
Create the bundle configuration file under
config/packages/purgatory.yaml
. Here is a reference configuration file:purgatory: # List of files or directories where Purgatory will look for additional purge definitions. mapping_paths: [] # Route names that match the given regular expressions will be ignored. route_ignore_patterns: [] # Examples: # - /^_profiler/ # - /^_wdt/ doctrine_middleware: enabled: true # Explicitly set the priority of Purgatory's Doctrine middleware. priority: null # Explicitly set the priorities of Purgatory's Doctrine event listener. doctrine_event_listener_priorities: preRemove: null postPersist: null postUpdate: null # This event is not registered when the Doctrine middleware is enabled. postFlush: null purger: # The ID of a service that implements the "Sofascore\PurgatoryBundle\Purger\PurgerInterface" interface name: null # Example: symfony # The hosts from which URLs should be purged hosts: [] # The service ID of the HTTP client to use, must be an instance of Symfony's HTTP client http_client: null messenger: # Set the name of the messenger transport to use transport: null # Set the name of the messenger bus to use bus: null # Set the number of urls to dispatch per message batch_size: null # Enables the data collector and profiler panel if the profiler is enabled. profiler_integration: true
-
Enable the bundle in
config/bundles.php
by adding it to the array:Sofascore\PurgatoryBundle\PurgatoryBundle::class => ['all' => true],
TODO
This project adheres to Semantic Versioning 2.0.0.
Use the issue tracker to report any issues you might have.
See the LICENSE file for license rights and limitations (MIT).