.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "MEMCACHED_DELETE" "3" "Mar 06, 2023" "1.1" "libmemcached-awesome" .SH NAME memcached_delete \- libmemcached Documentation .SH SYNOPSIS .INDENT 0.0 .TP .B #include Compile and link with \-lmemcached .UNINDENT .INDENT 0.0 .TP .B \fI\%memcached_return_t\fP memcached_delete(\fI\%memcached_st\fP *ptr, const char *key, size_t key_length, time_t expiration) .UNINDENT .INDENT 0.0 .TP .B \fI\%memcached_return_t\fP memcached_delete_by_key(\fI\%memcached_st\fP *ptr, const char *group_key, size_t group_key_length, const char *key, size_t key_length, time_t expiration) .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBptr\fP \-\- pointer to initialized \fI\%memcached_st\fP struct .IP \(bu 2 \fBgroup_key\fP \-\- key namespace .IP \(bu 2 \fBgroup_key_length\fP \-\- length of the \fI\%group_key\fP without any terminating zero .IP \(bu 2 \fBkey\fP \-\- the key to delete .IP \(bu 2 \fBkey_length\fP \-\- the length og the \fI\%key\fP without any terminating zero .IP \(bu 2 \fBexpiration\fP \-\- obsolete since \fBmemcached(1)\fP version 1.4 .UNINDENT .TP .B Returns \fI\%memcached_return_t\fP indicating success .UNINDENT .UNINDENT .SH DESCRIPTION .sp \fI\%memcached_delete()\fP is used to delete a particular key. \fI\%memcached_delete_by_key()\fP works the same, but it takes a master key to find the given value. .sp Expiration works by placing the item into a delete queue, which means that it won\(aqt be possible to retrieve it by the \(dqget\(dq command. The \(dqadd\(dq and \(dqreplace\(dq commands with this key will also fail (the \(dqset\(dq command will succeed, however). After the time passes, the item is finally deleted from server memory. .sp Please note the the memcached server removed tests for expiration in the 1.4 version. .SH RETURN VALUE .sp A value of type \fI\%memcached_return_t\fP is returned On success that value will be \fI\%MEMCACHED_SUCCESS\fP\&. Use \fI\%memcached_strerror()\fP to translate this value to a printable string. .sp If you are using the non\-blocking mode of the library, success only means that the message was queued for delivery. .SH SEE ALSO .sp \fBmemcached(1)\fP \fBlibmemcached(3)\fP \fBmemcached_strerror(3)\fP .\" Generated by docutils manpage writer. .