Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

memcached_fetch (3libmemcached)

Name

memcached_fetch - Retrieving data from the server

Synopsis

#include <libmemcached/memcached.h>

char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length,
size_t *value_length, uint32_t *flags, memcached_return_t *error)
Deprecated  since  version  0.50:  Use  memcached_fetch_result()
instead.

Compile and link with -lmemcached

Description

libmemcached                                    MEMCACHED_FETCH(3libmemcached)



NAME
       memcached_fetch - Retrieving data from the server

SYNOPSIS
       #include <libmemcached/memcached.h>

       char *memcached_fetch(memcached_st *ptr, char *key, size_t *key_length,
       size_t *value_length, uint32_t *flags, memcached_return_t *error)
              Deprecated  since  version  0.50:  Use  memcached_fetch_result()
              instead.

       Compile and link with -lmemcached

DESCRIPTION
       memcached_fetch() is used to fetch an individual value from the server.
       memcached_mget() must always be called before using this  method.   You
       must  pass in a key and its length to fetch the object. You must supply
       three pointer variables which will give you the state of  the  returned
       object.   A  uint32_t pointer to contain whatever flags you stored with
       the value, a size_t pointer which will be filled with size  of  of  the
       object,  and a memcached_return_t pointer to hold any error. The object
       will be returned upon success and NULL will  be  returned  on  failure.
       MEMCACHED_END  is  returned  by  the *error value when all objects that
       have been found are returned. The final  value  upon  MEMCACHED_END  is
       null.

       Values returned by memcached_fetch() must be freed by the caller.

       All  of  the  above  functions are not tested when the MEMCACHED_BEHAV-
       IOR_USE_UDP has been set. Executing any of these  functions  with  this
       behavior  on  will result in MEMCACHED_NOT_SUPPORTED being returned, or
       for those functions which do not return a memcached_return_t, the error
       function parameter will be set to MEMCACHED_NOT_SUPPORTED.

RETURN
       memcached_fetch()  sets  error to to MEMCACHED_END upon successful con-
       clusion.  MEMCACHED_NOTFOUND will be return if  no  keys  at  all  were
       found.

       MEMCACHED_KEY_TOO_BIG  is  set  to error whenever memcached_fetch() was
       used and the key was set larger then MEMCACHED_MAX_KEY, which  was  the
       largest key allowed for the original memcached ascii server.

HOME
       To find out more information please check: http://libmemcached.org/


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+----------------------+
       |ATTRIBUTE TYPE |   ATTRIBUTE VALUE    |
       +---------------+----------------------+
       |Availability   | library/libmemcached |
       +---------------+----------------------+
       |Stability      | Uncommitted          |
       +---------------+----------------------+

SEE ALSO
       memcached(1)       libmemcached(3)      memcached_strerror(3)      mem-
       cached_fetch_result(3)

AUTHOR
       Brian Aker

COPYRIGHT
       2011-2013, Brian Aker DataDifferential, http://datadifferential.com/



NOTES
       Source code for open source software components in Oracle  Solaris  can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source    was    downloaded     from      https://launchpad.net/libmem-
       cached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz.

       Further information about this software can be found on the open source
       community website at http://libmemcached.org/libMemcached.html.



1.0.18                         February 09, 2014
                                                MEMCACHED_FETCH(3libmemcached)