Memcache::get

(no version information, might be only in CVS)

Memcache::get -- Retrieve item from the server

Description

mixed Memcache::get ( string key)

Memcache::get() returns previously stored data if an item with such key exists on the server at this moment.

例子 1. Memcache::get() example

<?php

/* procedural API */
$memcache_obj = memcache_connect('memcache_host', 11211);
$var = memcache_get($memcache_obj, 'some_key');

/* OO API */
$memcache_obj = new Memcache;
$memcache_obj->connect('memcache_host', 11211);
$var = $memcache_obj->get('some_key');

?>

Memcache::get() returns FALSE on failure.