public function write($id, $data) {
        $tmp = $_SESSION;
        session_decode($data);
        $newData  = $_SESSION;
        $_SESSION = $tmp;
        $key      = $this->getKey($id);
        return $this->mem->set($key, json_encode($newData), $this->ttl);
    }