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

Provide a getResultCode() to check if the most recent memcache operation had an error? #72

Open
TysonAndre opened this issue Aug 12, 2020 · 0 comments
Labels

Comments

@TysonAndre
Copy link
Contributor

The related Memcached pecl provides
https://www.php.net/manual/en/memcached.getresultcode.php
https://www.php.net/manual/en/memcached.getresultmessage.php

Otherwise, workarounds have to be used to distinguish between

  1. The value false, from unserialize() (if applications used them)
  2. A cache miss (absence can be detected with $flags)
  3. An memcache protocol error/timeout that caused Memcache to return false (error_clear_last()/error_get_last() can be used as a workaround, unless set_error_handler's callback has the possibility of clearing the last error or triggering other notices)

https://bugs.php.net/bug.php?id=69809 is vaguely related but I'm guessing behavior changed in php7

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

No branches or pull requests

2 participants