/** * Sets the Key/Value pair in the database * * @param mixed $key The key to store * @param mixed $value The value to store * * @return bool */ public function set($key, $value) { $position = $this->getPosition($key); if (false !== $position) { $this->file->update($position, $key, $value); $this->rebuildIndex(); } else { $pos = $this->file->insert($key, $value); $this->index->set($key, $pos); } return true; }