Check properties in Utils\wp_clear_object_cache#4615
Merged
schlessera merged 3 commits intomasterfrom Jan 23, 2018
Merged
Conversation
Contributor
Author
|
Might as well do this I think in spite of #4617 in case it's being used externally. |
Member
|
I'm opposed to this change. While the "hack" we had included to keep memory usage in check was trying to isolate the flushing to local memory only, calling The contents of the remote cache have nothing to do with WP-CLI memory usage, and just flushing it for not reason is irresponsible when dealing with larger sites. |
Contributor
Author
|
Oh okay, so just remove the call to |
schlessera
approved these changes
Jan 23, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed on doing wp-cli/media-command#62 PR that
Utils\wp_clear_object_cache()was setting some non-defined properties on theWP_Object_Cacheobject.The code appears to be Memcached and Memcached Redux plugin specific according to https://core.trac.wordpress.org/ticket/31463. See also
WP_UnitTestCase::flush_cache()in core test suite https://github.com/WordPress/wordpress-develop/blob/4.9.1/tests/phpunit/includes/testcase.php#L321.So this PR updates the
wp_clear_object_cache()to use the standardwp_cache_flush()function, keeping the other stuff for BC but checking first and usingmethod_exists()on__remotesetcheck.