wearerequired / wp-cli-clear-opcache

🔧 Use WP-CLI to clear the OPcache for a site via HTTP.
GNU General Public License v2.0
17 stars 3 forks source link

Support invalidating specific files #7

Closed ocean90 closed 7 years ago

ocean90 commented 7 years ago

OPcache has also opcache_invalidate() to invalidate a cached script. Is this something the plugin should support?

The command could look like $ wp opcache clear <script path> [--force].

http://php.net/manual/en/function.opcache-invalidate.php

swissspidy commented 7 years ago

Or perhaps wp opcache invalidate <script path> [--force] so people don't think wp opcache clear --force makes any difference to wp opcache clear?

ocean90 commented 7 years ago

That's fine too, I used clear since that's what we currently have. We could also ignore the force part and set it to true by default.