Directory

cache-flush check: Return early if a match is found by xknown · Pull Request #182 · wp-cli/doctor-command · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

xknown
Copy link
Contributor

@xknown xknown commented Nov 16, 2023

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 #178

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 wp-cli#178
@xknown xknown requested a review from a team as a code owner November 16, 2023 22:16
@swissspidy swissspidy merged commit 1c46617 into wp-cli:main Nov 17, 2023
7 checks passed
@swissspidy swissspidy added this to the 2.2.0 milestone Nov 17, 2023
@xknown xknown deleted the fix/cache-flush-performance branch November 17, 2023 11:33
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.

None yet

2 participants