--TEST-- memcache->flush() with time in future --SKIPIF-- --FILE-- addServer($host, $port); $result1 = $memcache->set('test_key', 'abc'); $result2 = $memcache->get('test_key'); var_dump($result1); var_dump($result2); $result = $memcache->flush(time()+3); var_dump($result); sleep(1); $result = $memcache->get('test_key'); var_dump($result); sleep(3); $result = $memcache->get('test_key'); var_dump($result); // Test partly failing flush $memcache = new Memcache(); $memcache->addServer($host, $port); $memcache->addServer($nonExistingHost, $nonExistingPort); $result = @$memcache->flush(); var_dump($result); // Test failing flush $memcache = new Memcache(); $memcache->addServer($nonExistingHost, $nonExistingPort); $result = @$memcache->flush(); var_dump($result); ?> --EXPECT-- bool(true) string(3) "abc" bool(true) string(3) "abc" bool(false) bool(false) bool(false)