Remove cache files from old releases to maintain cleanliness and reduce disk usage as part of the deployment process, but only after the deployment has completed successfully. This is currently relevant only for Craft CMS projects, where the web/cache/blitz folder is used for caching. On deployment, ensure that the web/cache/blitz directory is deleted from all previous releases except the current one, and perform this operation after confirming a successful deployment.
- Integrate this cleanup step into the deployment workflow after a successful deployment.
- Target only Craft CMS deployments.
- Ensure the web/cache/blitz directory is removed for each release except the current active one.
- Confirm this does not affect the current release's cache.
- Add documentation or comments explaining why this is required for Craft CMS projects.
This helps prevent storage bloat and ensures outdated cache files do not linger in old releases, and ensures the cleanup is safe for the current deployment.
Remove cache files from old releases to maintain cleanliness and reduce disk usage as part of the deployment process, but only after the deployment has completed successfully. This is currently relevant only for Craft CMS projects, where the web/cache/blitz folder is used for caching. On deployment, ensure that the web/cache/blitz directory is deleted from all previous releases except the current one, and perform this operation after confirming a successful deployment.
This helps prevent storage bloat and ensures outdated cache files do not linger in old releases, and ensures the cleanup is safe for the current deployment.