note 86351 added to function.memcache-get

From: Date: Tue, 14 Oct 2008 15:18:17 +0000
Subject: note 86351 added to function.memcache-get
Groups: php.notes 
Request: Send a blank email to php-notes+get-145348@lists.php.net to get a copy of this message
Be aware that when using the multi-key version, Memcache::get returns bool false if no servers are configured for the pool (and possibly if other errors occur as well while attempting to fetch). Also, Memcache class throws annoying warnings on every get/set/delete-type calls if you have no servers added to the pool. The following snippet var_dump's bool false, not an empty array like you might expect. <? $cache = new Memcache; // no $cache->addServer calls (for example, due to temporarily disabling use of cache) // use @ symbol to ignore warning var_dump( @$cache->get(array('one', 'two')) ); ?> ---- Server IP: 216.235.15.211 Probable Submitter: 69.70.125.250 ---- Manual Page -- http://www.php.net/manual/en/function.memcache-get.php Edit -- https://master.php.net/note/edit/86351 Del: integrated -- https://master.php.net/note/delete/86351/integrated Del: useless -- https://master.php.net/note/delete/86351/useless Del: bad code -- https://master.php.net/note/delete/86351/bad+code Del: spam -- https://master.php.net/note/delete/86351/spam Del: non-english -- https://master.php.net/note/delete/86351/non-english Del: in docs -- https://master.php.net/note/delete/86351/in+docs Del: other reasons-- https://master.php.net/note/delete/86351 Reject -- https://master.php.net/note/reject/86351 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#145348) next »