Skip to content

Fix flush command bugs and expose clear-all cache for deployments#35

Merged
swissspidy merged 5 commits intomainfrom
copilot/add-clear-all-setting
Mar 11, 2026
Merged

Fix flush command bugs and expose clear-all cache for deployments#35
swissspidy merged 5 commits intomainfrom
copilot/add-clear-all-setting

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

  • Fix duplicate wp_cache_post_change() call bug in flush command
  • Add success messages for --post_id and --permalink flush cases
  • Update flush command to use modern WP-CLI docblock format with ## OPTIONS and ## EXAMPLES
  • Fix --post_id validation to use absint() and check > 0 (rejects 0, negatives, non-numeric strings)
  • Fix --permalink validation to use absint() and check > 0 (url_to_postid() returns 0 on failure, is_numeric(0) was true)
  • Add Behat test scenarios for flush (all cache), flush --post_id, invalid --post_id
  • Add Behat test scenarios for flush --permalink (success) and unknown permalink (error)
Original prompt

This section details on the original issue you should resolve

<issue_title>Add a clear all setting</issue_title>
<issue_description>WP Super Cache has a clear all capability in the plugin.

When doing code pushes having the ability to clear all the cache would be extremely helpful.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

… add success messages

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add clear all cache setting for WP Super Cache Fix flush command bugs and expose clear-all cache for deployments Mar 11, 2026
@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy requested a review from Copilot March 11, 2026 09:29
@swissspidy swissspidy added this to the 2.0.1 milestone Mar 11, 2026
@swissspidy swissspidy marked this pull request as ready for review March 11, 2026 09:30

This comment was marked as resolved.

@swissspidy

This comment was marked as resolved.

…Behat tests

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>

This comment was marked as resolved.

@swissspidy swissspidy merged commit a9dbf2e into main Mar 11, 2026
60 checks passed
@swissspidy swissspidy deleted the copilot/add-clear-all-setting branch March 11, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a clear all setting

3 participants