public function set($id, $value, $ttl = 0) { if (!$this->isEnabled()) { return false; } $this->vcache[$id] = $value; if ($ttl === null) { $ttl = $this->config["default_ttl"]; } $stored = $this->memcache->replace($id, $value, $flag = 0, $ttl); if ($stored == false) { $stored = $this->memcache->set($id, $value, $flag = 0, $ttl); } return $stored; }