-
Notifications
You must be signed in to change notification settings - Fork 802
Improve documentation of the Memcached delete methods #1957
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
Conversation
tstarling
commented
Nov 7, 2022
- Note that it's always an error to specify a non-zero time parameter, and delete the long-winded explanations of what it is meant to do.
- Expand the description of the return value from deleteMulti().
- Replace the incorrect description of the return value of deleteMultiByKey(). Use the one from deleteMulti() instead.
- Explain what getResultCode() will return after deleteMulti().
* Note that it's always an error to specify a non-zero time parameter, and delete the long-winded explanations of what it is meant to do. * Expand the description of the return value from deleteMulti(). * Replace the incorrect description of the return value of deleteMultiByKey(). Use the one from deleteMulti() instead. * Explain what getResultCode() will return after deleteMulti().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I cannot comment on memcached, so just a few nits.
<!ENTITY memcached.result.delete-multi '<para xmlns="http://docbook.org/ns/docbook"> | ||
Returns an array indexed by <parameter>keys</parameter>. Each element | ||
is &true; if the corresponding key was deleted, or one of the | ||
<constant>Memcached::RES_*</constant> constants if the corresponding deletion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If #1963 will be merge, this should be:
<constant>Memcached::RES_*</constant> constants if the corresponding deletion | |
<constant><replaceable>Memcached::RES_*</replaceable></constant> constants if the corresponding deletion |
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
language-snippets.ent
Outdated
<!ENTITY memcached.note.delete-time '<note xmlns="http://docbook.org/ns/docbook"><simpara> | ||
As of memcached 1.3.0 (released 2009) this feature is no longer | ||
supported. Passing a non-zero <parameter>time</parameter> will cause | ||
libmemcached to raise an error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know what sort of error is raised? Is it an exception an E_WARNING
, an E_NOTICE
something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, that is unclear, I will improve it. The library has its own error handling. $memcached->delete() will return false and $memcached->getResultCode() returns MEMCACHED_INVALID_ARGUMENTS. No PHP error is raised.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM the markup with replaceable constant is still undecided, so let's fix this at a later point.
Am I permitted to self-merge now that it has an approval? |
Yes, sorry. The process here is for the most part to self merge, but if you don't want we can do it. |