Spanner/src/Session/CacheSessionPool.php
public function clear()
    {
        $sessions = $this->config['lock']->synchronize(function () {
            $item = $this->cacheItemPool->getItem($this->cacheKey);
            $data = (array) $item->get() ?: $this->initialize();
            $sessions = $data['queue'] + $data['inUse'];
            $this->cacheItemPool->clear();

            return $sessions;
        });

        $this->deleteSessions($sessions);
    }
public function clear()
    {
        $sessions = $this->config['lock']->synchronize(function () {
            $item = $this->cacheItemPool->getItem($this->cacheKey);
            $data = (array) $item->get() ?: $this->initialize();
            $sessions = $data['queue'] + $data['inUse'];
            $this->cacheItemPool->clear();

            return $sessions;
        });

        $this->deleteSessions($sessions);
    }
public function clear ( ) { $ sessions = $ this -> config [ 'lock' ] -> synchronize ( function ( ) { $ item = $ this -> cacheItemPool -> getItem ( $ this -> cacheKey ) ; $ data = ( array ) $ item -> get ( ) ? : $ this -> initialize ( ) ; $ sessions = $ data [ 'queue' ] + $ data [ 'inUse' ] ; $ this -> cacheItemPool -> clear ( ) ; return $ sessions ; } ) ; $ this -> deleteSessions ( $ sessions ) ; }
Clear the cache and attempt to delete all sessions in the pool.

A session may be removed from the cache, but still tracked as active by
the Spanner backend if a delete operation failed. To ensure you do not
exceed the maximum number of sessions available per node, please be sure
to check the return value of this method to be certain all sessions have
been deleted.
Clear the cache and attempt to delete all sessions in the pool .