trellis_purge_kinsta_cache_during_deploy
trellis-purge-kinsta-cache-during-deploy
Purge Kinsta cache when Trellis deploys Bedrock.
- Requirements
- Installation
- Role Variables
- Usage
- FAQs
- See Also
- Testing
- Author Information
- Feedback
- Change log
- License
Requirements
- Trellis 411981f or later
- Ansible v2.6 or later
- Kinsta Must-use Plugins v2.3.1 or later
Installation
Add this role to galaxy.yml
:
# galaxy.yml
- src: https://github.com/ItinerisLtd/trellis-purge-kinsta-cache-during-deploy
version: x.x.x # Check for latest version!
Run the command:
trellis galaxy install
# Alternatively
ansible-galaxy install -r galaxy.yml --force
Role Variables
Add this role to the deploy_after
hook:
# group_vars/all/deploy-hooks.yml
# Learn more on https://roots.io/trellis/docs/deploys/#hooks
deploy_after:
- "{{ playbook_dir }}/vendor/roles/trellis-purge-kinsta-cache-during-deploy/tasks/main.yml"
Usage
Deploy as usual. No special action needed.
FAQs
How do you purge Kinsta cache?
By invoking wp kinsta cache purge
and wp kinsta cache purge --object
during deploy.
Why ignore errors?
Since v0.4.0, this role ignore errors for wp kinsta cache purge
and wp kinsta cache purge --object
. This is because those 2 commands trigger HTTP requests to localhost
which might trigger 429 too many requests
errors.
Kinsta support refused to whitelist localhost
requests from rate limits.
Does it purge Kinsta CDN caches?
No.
Unfortunately no, there is no way on clearing that [Kinsta CDN] cache through command line for now.
There are internal discussions and our developers are working on finding a solution, but unfortunately at this point we do not have an ETA or if that will be available.
-- Kinsta Support
See Also
Testing
Syntax Check
➜ ansible-playbook -i 'localhost,' --syntax-check tests/test.yml
Author Information
trellis-purge-kinsta-cache-during-deploy is a Itineris Limited project created by Tang Rufus.
Special thanks to the Roots team whose Trellis make this project possible.
Full list of contributors can be found here.
Feedback
Please provide feedback! We want to make this library useful in as many projects as possible. Please submit an issue and point out what you do and don't like, or fork the project and make suggestions. No issue is too small.
Change log
Please see CHANGELOG for more information on what has changed recently.
License
trellis-purge-kinsta-cache-during-deploy is released under the MIT License.
ansible-galaxy install ItinerisLtd/trellis-purge-kinsta-cache-during-deploy