src/Web/Sessions/CachedSessionHandler.php
public function destroy($id, $archiveRemove = false)
    {
        if (isset($this->keys[$id])) {
            unset($this->keys[$id]);
        }
        $key = $this->getSessionKey($id);
        return $this->cache->delete($key)->then(
            function() use ($id) { return $id; },
            function($error = null) use ($id) {
                $message = sprintf('Failed to destroy session "%s"', $id);
                throw new SessionException($message, 0, $error);
            }
        )->always(function() use ($id, $archiveRemove) {
            return $archiveRemove ? $this->archive->remove($id) : true;
        });
    }
public function destroy($id, $archiveRemove = false)
    {
        if (isset($this->keys[$id])) {
            unset($this->keys[$id]);
        }
        $key = $this->getSessionKey($id);
        return $this->cache->delete($key)->then(
            function() use ($id) { return $id; },
            function($error = null) use ($id) {
                $message = sprintf('Failed to destroy session "%s"', $id);
                throw new SessionException($message, 0, $error);
            }
        )->always(function() use ($id, $archiveRemove) {
            return $archiveRemove ? $this->archive->remove($id) : true;
        });
    }
Destroy a session
@param string $id The session ID being destroyed.
@param bool   $archiveRemove Remove data from archive or no
@return ExtendedPromiseInterface with bool when finished