visuellverstehen/statamic-advanced-invalidator
最新稳定版本:v1.0.2
Composer 安装命令:
composer require visuellverstehen/statamic-advanced-invalidator
包简介
A Statamic invalidation class for static caching with advanced capabilities.
README 文档
README
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.
统计信息
- 总下载量: 836
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-02