putyourlightson / craft-blitz-cloudfront
CloudFront cache purger for the Blitz plugin.
Installs: 44 930
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 5
Open Issues: 1
Type:craft-plugin
Requires
- php: ^8.2
- aws/aws-sdk-php: ^3.0
- craftcms/cms: ^5.0
- putyourlightson/craft-blitz: ^5.0
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/phpstan: dev-main
This package is auto-updated.
Last update: 2024-11-07 18:26:35 UTC
README
Blitz CloudFront Purger Plugin for Craft CMS
The CloudFront Purger plugin allows the Blitz plugin for Craft CMS to intelligently purge pages cached on AWS CloudFront.
Note that Amazon CloudFront charges for invalidation requests. Since invalidation requests can quickly add up when purging individual URLs, you should be aware of the potential costs. PutYourLightsOn takes no responsibility whatsoever for expenses incurred.
The first 1,000 invalidation paths that you submit per month are free; you pay for each invalidation path over 1,000 in a month. An invalidation path can be for a single file (such as
/images/logo.jpg
) or for multiple files (such as/images/*
). A path that includes the*
wildcard counts as one path even if it causes CloudFront to invalidate thousands of files.
Source: docs.aws.amazon.com
License
This plugin requires a free commercial license available through the Craft Plugin Store.
Requirements
This plugin requires Craft CMS 3.0.0 or later, or 4.0.0 or later, or 5.0.0 or later.
Installation
To install the plugin, search for “Blitz CloudFront Purger” in the Craft Plugin Store, or install manually using composer.
composer require putyourlightson/craft-blitz-cloudfront
Usage
Once installed, the CloudFront Purger can be selected in the Blitz plugin settings or in config/blitz.php
.
// The purger type to use. 'cachePurgerType' => 'putyourlightson\blitzcloudfront\CloudFrontPurger', // The purger settings. 'cachePurgerSettings' => [ 'region' => 'us-east-1', 'apiKey' => 'p_prod_abcdefgh1234567890', 'apiSecret' => 's_prod_abcdefgh1234567890', 'distributionId' => '123456789', 'warmCacheDelay' => '5', ],
Created by PutYourLightsOn.