Skip to content

fix(purge): pass --hard only where sage-cachetags supports it - #14

Merged
oxyc merged 1 commit into
masterfrom
fix/cachetags-hard-unsupported
Nov 16, 2026
Merged

oxyc merged 1 commit into
masterfrom
fix/cachetags-hard-unsupported

Conversation

@oxyc

@oxyc oxyc commented Nov 16, 2026

Copy link
Copy Markdown
Member

Follow-up to #13. cache:clear:cachetags passed --hard for a hard or auto purge, but flush --hard only exists from sage-cachetags 3.2 (generoi/sage-cachetags#72, not yet tagged). The other sites with cachetags in a maintenance tier run older ones:

sage-cachetags Sites
1.3.0 valokuitunen
2.3.2 arter, talliosake
2.5.3–2.5.4 beamex, btbtransformers, herrfors, pellervo, potwell.fi, snellmangroup, solving, spfpension
3.0.4 solarplexius, suomentyokalu

WP-CLI rejects the unknown flag, the purge task only warns, and cachetags is left unflushed. Now the task passes --hard only when wp help cachetags flush lists it. Otherwise it runs a plain flush and warns: that flush is already hard unless the site uses 2.x's FastlySoftCacheInvalidator.

Tested the check both ways: on solarplexius's installed v3.0.4 it reports no --hard; with #72's code in wp-env it finds it.

🤖 Generated with Claude Code

Most sites run sage-cachetags 1.x-2.x, whose flush has no --hard.
WP-CLI rejects the unknown flag, so a hard or auto purge left
cachetags unflushed. Check the command's help first and fall back to
a plain flush with a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oxyc
oxyc merged commit 14d2faa into master Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant