Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Memcache Functions : Memcache::flush

Memcache::flush

Flush all existing items at the server ()
bool Memcache::flush ( )

Example 1313. Memcache::flush() example

<?php

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

memcache_flush($memcache_obj);

/* OO API */

$memcache_obj = new Memcache;
$memcache_obj->connect('memcache_host', 11211);

$memcache_obj->flush();

?>

Code Examples / Notes » memcache_flush

maarten d/ot manders a/t tilllate dotcom

Please note that after flushing, you have to wait a certain amount of time (in my case < 1s) to be able to write to Memcached again. If you don't, Memcached::set() will return 1, although your data is in fact not saved.

Change Language


Follow Navioo On Twitter
Memcache::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
eXTReMe Tracker