Skip to content

A Symfony bundle for creating and sending cache purge requests to HTTP cache backends like Varnish.

License

Notifications You must be signed in to change notification settings

sofascore/purgatory-bundle

Repository files navigation

SofascorePurgatoryBundle

Latest Stable Version Build Status Code Coverage License

A Symfony bundle for creating and sending cache purge requests to HTTP cache backends like Varnish.

Features

  • TODO

Requirements

Installation

  1. Require the bundle with Composer:

    composer require sofascore/purgatory-bundle
  2. 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
  3. Enable the bundle in config/bundles.php by adding it to the array:

    Sofascore\PurgatoryBundle\PurgatoryBundle::class => ['all' => true],

Usage

TODO

Versioning

This project adheres to Semantic Versioning 2.0.0.

Reporting issues

Use the issue tracker to report any issues you might have.

License

See the LICENSE file for license rights and limitations (MIT).