visuellverstehen/statamic-advanced-invalidator

A Statamic invalidation class for static caching with advanced capabilities.
1,177
Install
composer require visuellverstehen/statamic-advanced-invalidator
Latest Version:v1.1.0
Laravel:11 · 12
Older releases:10
License:MIT
Last Updated:Aug 6, 2026
Links: GitHub  ·  Packagist
Maintainer: visuellverstehen

Statamic Advanced Invalidator

A Statamic invalidation class for static caching with advanced capabilities. It allows invalidating named routes, cache keys and CacheTracker tags when the static cache for content items is cleared.

How to Install

Simply run the following command from your project root:

composer require visuellverstehen/statamic-advanced-invalidator

How to Use

In your static_caching.php file add AdvancedInvalidator for the class key in the invalidation section. That allows you to add additional invalidation rules:

use VV\AdvancedInvalidator\AdvancedInvalidator;

// …

'invalidation' => [
    'class' => AdvancedInvalidator::class,
    
    'rules' => [
        'collections' => [
            'pages' => [
                'urls' => [
                    // urls to invalidate
                ],
                'named_routes' => [
                    // route names
                    // routes will be resolved and merged with urls above
                    'user.login',
                ],
                'keys' => [
                    // cache key names
                    'my-cache-key',
                ],
                'tags' => [
                    // when using the CacheTracker package you can add
                    // tags that should be invalidated
                    'partial:sitemap',
                ],
            ],
        ],
    ]
]

More about us

License

The MIT license (MIT). Please take a look at the license file for more information.

Related Packages

visuellverstehen/statamic-classify

A useful helper to add CSS classes to all HTML tags generated by the bard editor...

125,334 20
aerni/fathom

Easily navigate to your shared Fathom site from Statamic's control panel

5,883 3
visuellverstehen/statamic-asset-atlas

Track where your Statamic assets are used to make moving, replacing and deleting...

38,639 1
visuellverstehen/statamic-picturesque

A Statamic tag for building HTML-only responsive images.

19,764 11

Version History

Version Released Laravel License
v1.1.0 ^11.0 || ^12.0 MIT
v1.0.2 ^10.0 || ^11.0 MIT
v1.0.1 ^10.0 || ^11.0 MIT
v1.0.0 ^10.0 || ^11.0