Skip to content

Conversation

biozshock
Copy link

Comment on lines +188 to +194
'Memcached::get' => ['hasSideEffects' => true],
'Memcached::getByKey' => ['hasSideEffects' => true],
'Memcached::getDelayed' => ['hasSideEffects' => true],
'Memcached::getDelayedByKey' => ['hasSideEffects' => true],
'Memcached::getMulti' => ['hasSideEffects' => true],
'Memcached::getMultiByKey' => ['hasSideEffects' => true],
'Memcached::getServerByKey' => ['hasSideEffects' => true],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does get method has side effects too ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VincentLanglet I'm sorry, which "get" method?
The getServerByKey, where your comment is located has the side effect: https://www.php.net/manual/en/memcached.getserverbykey.php#refsect1-memcached.getserverbykey-returnvalues

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant all the getFoo method sonce they arr just getter

But if I understand correctly they all have side effect because they have impact on the getResultCode

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VincentLanglet exactly. I think that i've marked all methods that change getResultCode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recognize the \Memcached::cas() can change the \Memcached::getResultCode()
2 participants