fork / craft-akamai-invalidator
Assign cache tags to pages and invalidate them on save.
Installs: 887
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 7
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- php: >=8.1
- akamai-open/edgegrid-client: ^2.0
- craftcms/cms: ^4.4.7.1
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/phpstan: dev-main
README
Assign cache tags to pages and invalidate them on save.
Features
- Assigns a cache tag based on the entry ID to each response.
- Automatically invalidates the cache tag of an entry on save.
- Invalidate the whole website via the
all
cache tag.
Requirements
This plugin requires Craft CMS 4.4.7.1 or later, and PHP 8.1 or later.
Installation
Open your terminal and run the following commands:
# go to the project directory cd /path/to/my-project.test # tell Composer to load the plugin composer require fork/craft-akamai-invalidator # tell Craft to install the plugin ./craft plugin/install akamai-invalidator
Configuration
Akamai authentication
To generate your Akamai credentials, see Create authentication credentials.
Place the .edgerc
file at your Craft root.
Plugin configuration
To configure the plugin, create a file config/akamai-invalidator.php
with the following options:
<?php return [ 'invalidateOnSave' => true, 'enableInvalidateAll' => false, 'network' => 'staging', 'edgeRcSection' => 'default', 'edgeRcPath' => '@root/.edgerc', ];
Configuration options
invalidateOnSave
— Whether the cache automatically gets invalidated on entry saveenableInvalidateAll
— Whether all pages can be invalidated at once via a Craft cache clear option.network
— The Akamai network in which the invalidate takes place. Eitherstaging
orproduction
.edgeRcSection
— The credentials section within.edgerc
edgeRcPath
— The path to the.edgerc
file. May use Craft Aliases.

Brought to you by Fork Unstable Media GmbH