« blib/lib/Memcached/libmemcached/memcached_create.pm
↑ Summary
blib/lib/Memcached/libmemcached/memcached_dump.pm »
| 1 | package Memcached::libmemcached::memcached_delete; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | memcached_delete - Delete a key | ||
| 6 | |||
| 7 | =head1 LIBRARY | ||
| 8 | |||
| 9 | C Client Library for memcached (libmemcached, -lmemcached) | ||
| 10 | |||
| 11 | =head1 SYNOPSIS | ||
| 12 | |||
| 13 | #include <memcached.h> | ||
| 14 | |||
| 15 | memcached_return_t | ||
| 16 | memcached_delete (memcached_st *ptr, | ||
| 17 | const char *key, size_t key_length, | ||
| 18 | time_t expiration); | ||
| 19 | |||
| 20 | memcached_return_t | ||
| 21 | memcached_delete_by_key (memcached_st *ptr, | ||
| 22 | const char *master_key, size_t master_key_length, | ||
| 23 | const char *key, size_t key_length, | ||
| 24 | time_t expiration); | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | memcached_delete() is used to delete a particular key. | ||
| 29 | memcached_delete_by_key() works the same, but it takes a master key to | ||
| 30 | find the given value. | ||
| 31 | |||
| 32 | Expiration works by placing the item into a delete queue, which means that | ||
| 33 | it won't possible to retrieve it by the "get" command, but "add" and | ||
| 34 | "replace" command with this key will also fail (the "set" command will | ||
| 35 | succeed, however). After the time passes, the item is finally deleted from server memory. | ||
| 36 | |||
| 37 | Please note the the Danga memcached server removed support for expiration in | ||
| 38 | the 1.4 version. | ||
| 39 | |||
| 40 | =head1 RETURN | ||
| 41 | |||
| 42 | A value of type C<memcached_return_t> is returned | ||
| 43 | On success that value will be C<MEMCACHED_SUCCESS>. | ||
| 44 | Use memcached_strerror() to translate this value to a printable string. | ||
| 45 | |||
| 46 | If you are using the non-blocking mode of the library, success only | ||
| 47 | means that the message was queued for delivery. | ||
| 48 | |||
| 49 | =head1 HOME | ||
| 50 | |||
| 51 | To find out more information please check: | ||
| 52 | L<https://launchpad.net/libmemcached> | ||
| 53 | |||
| 54 | =head1 AUTHOR | ||
| 55 | |||
| 56 | Brian Aker, E<lt>brian@tangent.orgE<gt> | ||
| 57 | |||
| 58 | =head1 SEE ALSO | ||
| 59 | |||
| 60 | memcached(1) libmemcached(3) memcached_strerror(3) | ||
| 61 | |||
| 62 | =cut | ||
| 63 | |||
| 64 | 1 | 1; |