UCE Docs / memcache_get

Signature

String memcache_get(u64 connection, String key, String default_value = "")

Parameters

connection : connection handle
key : key string
default_value : optional default value
return value : value that was returned by the Memcache server

Retrieves a value from an existing Memcache connection.

If the key is missing, default_value is returned instead.

Example

u64 conn = memcache_connect();
if(conn != 0) { memcache_set(conn, "doc_get_key", "stored value"); print(memcache_get(conn, "doc_get_key"), "\n"); }
else print("(requires a reachable memcached server)\n");
Output
stored value