MEMCACHED_RETURN_T(3)

πŸ’– MEMCACHED_RETURN_T πŸ’–

okay bestie, welcome to MEMCACHED_RETURN_T(3) β€” this one's from libmemcached-awesome and it's literally just the encyclopedia of every return value the library can hand back to you. every success, every fail, every "girl what happened". it's giving receipts. 🧾✨


🌸 NAME 🌸

memcached_return_t β€” return type values. aka the whole mood ring of libmemcached. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

first things first, include the header and link the lib, no skipping:

#include <libmemcached/memcached.h>
       Compile and link with -lmemcached

then you got your four vibe-checker functions, all taking a memcached_return_t rc and handing you back a bool:

bool memcached_success(memcached_return_t rc)

bool memcached_continue(memcached_return_t rc)

bool memcached_failed(memcached_return_t rc)

bool memcached_fatal(memcached_return_t rc)

and the type itself is just an enum wearing a lil typedef hat:

typedef enum memcached_return_t memcached_return_t

enum memcached_return_t

✨ the enumerators, aka the whole cast ✨

every single one, in order, no skips, no cuts. πŸ‘‘

  • MEMCACHED_AUTH_CONTINUE β€” authentication has been paused. it's not over, it's just on hold bestie.
  • MEMCACHED_AUTH_FAILURE β€” the credentials you handed over are not valid for this server. wrong password energy fr.
  • MEMCACHED_AUTH_PROBLEM β€” something unknown went sideways during authentication. no idea what, just chaos. 😭
  • MEMCACHED_BAD_KEY_PROVIDED β€” the key you gave is not a valid key. not a key, bestie.
  • MEMCACHED_BUFFERED β€” the request has been buffered. it's chilling in the queue, it'll go. 🫢
  • MEMCACHED_CLIENT_ERROR β€” an unknown client error popped off internally. internally, mind you.
  • MEMCACHED_CONNECTION_BIND_FAILURE β€” deprecated since version <0.30. back in the day this meant we were not able to bind() to the socket. rip to her. πŸͺ¦
  • MEMCACHED_CONNECTION_FAILURE β€” an unknown error went down while trying to connect to a server. πŸ’€
  • MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE β€” deprecated since version <0.30. an error happened while trying to connect to a server. it's likely that either the number of file descriptors need to be increased or you are out of memory. so like, either raise your fd limit or free some RAM.
  • MEMCACHED_DATA_DOES_NOT_EXIST β€” the data you asked for with that key was not found. it's simply not there. πŸ™ˆ
  • MEMCACHED_DATA_EXISTS β€” the data requested with the key given was not found. yes bestie that is literally what it says, I am not editorializing, this is a real line in the real docs πŸ’€
  • MEMCACHED_DELETED β€” the object requested by the key has been deleted. gone. bye. ✨
  • MEMCACHED_DEPRECATED β€” the method you requested has been deprecated. it's giving vintage.
  • MEMCACHED_E2BIG β€” item is too large for the server to store. too big, bestie, it does not fit.
  • MEMCACHED_END β€” the server has completed returning all of the objects requested. that's a wrap, that's the end of the list, slay. πŸŽ€
  • MEMCACHED_ERRNO β€” an error happened in the driver, and the driver went and set errno. go check it. πŸ”
  • MEMCACHED_FAIL_UNIX_SOCKET β€” a connection was not established with the server via a unix domain socket. no socket, no service.
  • MEMCACHED_FAILURE β€” deprecated since version <0.30. an unknown failure happened in the server. (grammar is "a unknown" in the source, we keep it, we love it 🫢)
  • MEMCACHED_FETCH_NOTFINISHED β€” a request has been made, but the server has not finished the fetch of the last request. hold on, she's still working.
  • MEMCACHED_HOST_LOOKUP_FAILURE β€” a DNS failure has occurred. the name did not resolve, the vibes did not resolve. 🌐
  • MEMCACHED_INVALID_ARGUMENTS β€” the arguments supplied to the given function were not valid. check your args bestie.
  • MEMCACHED_INVALID_HOST_PROTOCOL β€” the server you're connecting to has an invalid protocol. most likely you are connecting to an older server that does not speak the binary protocol. she's old, she doesn't speak the language.
  • MEMCACHED_ITEM β€” an item has been fetched (this is an internal error only).
  • MEMCACHED_KEY_TOO_BIG β€” the key you provided is too large for the given server. big key, small server.
  • MEMCACHED_MAXIMUM_RETURN β€” this in an internal only state. (yes, "this in an" β€” verbatim, keeping it πŸ’…)
  • MEMCACHED_MEMORY_ALLOCATION_FAILURE β€” an error happened while trying to allocate memory. oom moment. 😭
  • MEMCACHED_NO_KEY_PROVIDED β€” deprecated since version <0.30: use MEMCACHED_BAD_KEY_PROVIDED instead. no key was provided. zero keys. none. nada.
  • MEMCACHED_NO_SERVERS β€” no servers have been added to the memcached_st object. you have an empty roster, bestie.
  • MEMCACHED_NOTFOUND β€” the object requested was not found. πŸ”Ž
  • MEMCACHED_NOTSTORED β€” the request to store an object failed. it did not go in the box. πŸ“¦
  • MEMCACHED_NOT_SUPPORTED β€” the given method is not supported in the server. not a thing here.
  • MEMCACHED_PARSE_ERROR β€” an error happened while trying to parse the configuration string. you should use memparse to determine what the error was. πŸ”§
  • MEMCACHED_PARSE_USER_ERROR β€” an error happened in parsing the configuration string. (that's "occurred in" with two spaces in the source β€” iconic, untouched ✨)
  • MEMCACHED_PARTIAL_READ β€” the read was only partially successful. half a read. not nothing, but not everything.
  • MEMCACHED_PROTOCOL_ERROR β€” an unknown error happened in the protocol. 🀷
  • MEMCACHED_READ_FAILURE β€” a read failure has occurred. πŸ“–βŒ
  • MEMCACHED_SERVER_ERROR β€” an unknown error happened in the server. not your fault, it's the server's.
  • MEMCACHED_SERVER_MARKED_DEAD β€” the requested server has been marked dead. she's dead, bestie. marked and everything. πŸͺ¦
  • MEMCACHED_SOME_ERRORS β€” a multi request has been made, and some undetermined number of errors have occurred. how many? unclear. but there are some.
  • MEMCACHED_STAT β€” a "stat" command has been returned in the protocol. πŸ“Š
  • MEMCACHED_STORED β€” the requested object has been successfully stored on the server. ATE. πŸ’…
  • MEMCACHED_SUCCESS β€” the request was successfully executed. the good one. the moment. we love to see it. πŸ‘‘
  • MEMCACHED_TIMEOUT β€” operation has timed out. ⏰
  • MEMCACHED_UNKNOWN_READ_FAILURE β€” an unknown read failure only occurs when either there is a bug in the server, or in rare cases where an ethernet nic is reporting dubious information. dubious information. that's the phrase. take it in.
  • MEMCACHED_UNKNOWN_STAT_KEY β€” the server you're communicating with has a stat key which has not be defined in the protocol. ("has not be defined" β€” verbatim, we stan 🫢)
  • MEMCACHED_VALUE β€” a value has been returned from the server (this is an internal condition only).
  • MEMCACHED_WRITE_FAILURE β€” an error happened while trying to write to a server. ✍️❌

πŸ”— SEE ALSO πŸ”—

go read the rest of the fam, they're all right here:


quick lil reminder bestie: nothing here is made up and nothing here is left out β€” every enumerator, every deprecation, every typo, all of it is exactly as the original says. the vibes are mine, the facts are hers. 🫢

okay that's the whole page, you ate, go #include <libmemcached/memcached.h> and handle your return codes like the main character you are. πŸ’–

β€” signed, sealed, and shipped with libmemcached-awesome, version 1.1, dated Jul 24, 2025 βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from