Determine if a keys exists
SYNOPSIS
- #include <libmemcached/memcached.h>
Compile and link with -lmemcached
-
memcached_return_t memcached_exist(memcached_st *ptr, char *key, size_t *key_length)
-
memcached_return_t memcached_exist_by_key(memcached_st *ptr, char *group_key, size_t *group_key_length, char *key, size_t *key_length)
- Parameters:
ptr -- pointer to an initialized
memcached_ststructgroup_key -- the key namespace
group_key_length -- length of the
group_keywithout any terminating zerokey -- the key to check
key_length -- length of the
keywithout any terminating zero
- Returns:
memcached_return_tindicating success
Added in version 0.53.
DESCRIPTION
memcached_exist() can be used to check if a key exists.
RETURN VALUE
MEMCACHED_SUCCESSThe key exists.
MEMCACHED_NOTFOUNDThe key was not found.