src/Web/Sessions/SessionArchiveInDb.php
public function set($id, $data)
    {
        $dataSerialized = $this->getHandler()->serializeData($data);
        $timestamp = time();
        $row = [
            'sid' => $id,
            'data' => $dataSerialized,
            'updated_at' => $timestamp,
        ];
        return $this->getInternal($id, false)
            ->then(function($existingRow) use ($row) {
                return $this->updateInternal($row, $existingRow);
            }, function() use ($row) {
                return $this->insertInternal($row);
            })->then(function() {
                return true;
            });
    }
public function set($id, $data)
    {
        $dataSerialized = $this->getHandler()->serializeData($data);
        $timestamp = time();
        $row = [
            'sid' => $id,
            'data' => $dataSerialized,
            'updated_at' => $timestamp,
        ];
        return $this->getInternal($id, false)
            ->then(function($existingRow) use ($row) {
                return $this->updateInternal($row, $existingRow);
            }, function() use ($row) {
                return $this->insertInternal($row);
            })->then(function() {
                return true;
            });
    }
Save data to archive
@param string $id
@param array  $data
@return ExtendedPromiseInterface which resolved after save complete