|
Memcache::get
Retrieve item from the server
()
Memcache::get() returns previously stored data if an item with such key exists on the server at this moment. You can pass array of keys to Memcache::get() to get array of values. The result array will contain only found key-value pairs. Return Values
Returns the string associated with the key or
ExamplesExample 1314. Memcache::get() example<?php Code Examples / Notes » memcache_getnate
Just a warning: the PHP Memcache class completely breaks the second you try to get() a key that was not set by the PHP Memcache class. Specifically, if any flags are present on an entry in Memcache, PHP doesn't know what to do and will close your connection to the cache. Took me quite a while to find out why I kept losing my connection to Memcache; of course, it's because I was trying to get() memcache keys that had flags=30 set. Lesson: stick to writing your own customized memcache class that connects via tcp and deals with flags the way you want them dealt with. |
Change LanguageMemcache::add Memcache::addServer Memcache::close Memcache::connect memcache_debug Memcache::decrement Memcache::delete Memcache::flush Memcache::get Memcache::getExtendedStats Memcache::getServerStatus Memcache::getStats Memcache::getVersion Memcache::increment Memcache::pconnect Memcache::replace Memcache::set Memcache::setCompressThreshold Memcache::setServerParams |