public function flush()
{
$success = $this->local->flush();
if ($success === false) {
return false;
}
// clear all buffered writes, flush wipes them out anyway
$this->clear();
// make sure that reads, from now on until commit, don't read from cache
$this->suspend = true;
$this->defer->flush();
return true;
}