wp-cli / doctor-command

Diagnose problems within WordPress by running a series of checks for symptoms
MIT License
146 stars 22 forks source link

cache-flush check: Return early if a match is found #182

Closed xknown closed 1 year ago

xknown commented 1 year ago

We currently scan all the PHP files in the target WP content dir looking for wp_cache_flush() uses, however we are not currently using the results in a meaninful way so we can just probably return early if the current check found a match.

If there are plans to list the matched files, we can probably attempt to use some more performan alternatives (grep if available for example) which should be likely faster than a PHP based implementation.

See https://github.com/wp-cli/doctor-command/issues/178