wp-cli / cache-command

Manages object and transient caches.
MIT License
15 stars 25 forks source link

Add `wp cache flush-group` for flushing a cache group #85

Closed janw-me closed 1 year ago

janw-me commented 1 year ago

Needs extra input for testing.

I don't know how to create/fake a cache implementation for better behat testing.

Fixes https://github.com/wp-cli/cache-command/issues/80

janw-me commented 1 year ago

@danielbachhuber the failed tests are valid, the errors should trigger with older WP versions. How do we handle this? is a @require-wp-6.1 the way to go?

danielbachhuber commented 1 year ago

@janw-me Yes, please:

  1. Create entirely separate scenarios.
  2. Add @require-wp-6.1 to the scenarios with the new functionality.
  3. Add @less-than-wp-6.1 to a scenario that tests the error case.
spacedmonkey commented 1 year ago

@danielbachhuber Where I do personally agree, I think delete group would be better. But there are plugins that used that already so we could not use it. Let's use flush-group, as this is the naming in core, even through it sucks, it sucks in the WordPress way.