ItinerisLtd.trellis_purge_kinsta_cache_during_deploy
trellis-purge-kinsta-cache-during-deploy
This tool clears the cache on Kinsta whenever Trellis is used to deploy Bedrock.
Table of Contents
- Requirements
- Installation
- Role Variables
- Usage
- FAQs
- See Also
- Testing
- Author Information
- Feedback
- Change log
- License
Requirements
- Trellis version 411981f or newer
- Ansible version 2.6 or newer
- Kinsta Must-use Plugins version 2.3.1 or newer
Installation
To add this role, include it in your galaxy.yml
file:
# galaxy.yml
- src: https://github.com/ItinerisLtd/trellis-purge-kinsta-cache-during-deploy
version: x.x.x # Check for the latest version!
Then run this command:
trellis galaxy install
# Alternatively
ansible-galaxy install -r galaxy.yml --force
Role Variables
To use this role, add it to the deploy_after
hook:
# group_vars/all/deploy-hooks.yml
# More info at https://roots.io/trellis/docs/deploys/#hooks
deploy_after:
- "{{ playbook_dir }}/vendor/roles/trellis-purge-kinsta-cache-during-deploy/tasks/main.yml"
Usage
Just deploy as you normally would. No extra steps are required.
FAQs
How do you clear Kinsta cache?
You can clear the cache by running wp kinsta cache purge
and wp kinsta cache purge --object
during the deployment.
Why ignore errors?
Starting from version 0.4.0, errors for the commands wp kinsta cache purge
and wp kinsta cache purge --object
are ignored. This is because these commands make requests to localhost
, which can sometimes lead to 429 too many requests
errors. Kinsta support does not allow localhost
requests to bypass rate limits.
Does it clear Kinsta CDN caches?
No.
Unfortunately, there is currently no way to clear the Kinsta CDN cache through the command line. Discussions are ongoing, and developers are working on a solution, but we do not have an estimated time for availability.
-- Kinsta Support
See Also
Testing
Syntax Check
You can check for syntax errors with this command:
➜ ansible-playbook -i 'localhost,' --syntax-check tests/test.yml
Author Information
The project trellis-purge-kinsta-cache-during-deploy is created by Itineris Limited and developed by Tang Rufus.
Special thanks to the team at Roots for making this project possible with their work on Trellis.
You can find a full list of contributors here.
Feedback
We welcome your feedback! Our goal is to make this tool useful for as many projects as possible. If you have suggestions or issues, please submit an issue or fork the project and propose changes. No feedback is too minor.
Change log
For details on recent changes, please refer to the CHANGELOG.
License
The project trellis-purge-kinsta-cache-during-deploy is released under the MIT License.
Purge Kinsta cache when Trellis deploys Bedrock
ansible-galaxy install ItinerisLtd.trellis_purge_kinsta_cache_during_deploy