public function getSessionsByTag($tag)
    {
        $taggedSessions = [];
        foreach ($this->metaDataCache->getByTag(Session::TAG_PREFIX . $tag) as $sessionIdentifier => $sessionInfo) {
            $session = new Session($sessionIdentifier, $sessionInfo['storageIdentifier'], $sessionInfo['lastActivityTimestamp'], $sessionInfo['tags']);
            $taggedSessions[] = $session;
        }
        return $taggedSessions;
    }
public function getSessionsByTag($tag)
    {
        $taggedSessions = [];
        foreach ($this->metaDataCache->getByTag(Session::TAG_PREFIX . $tag) as $sessionIdentifier => $sessionInfo) {
            $session = new Session($sessionIdentifier, $sessionInfo['storageIdentifier'], $sessionInfo['lastActivityTimestamp'], $sessionInfo['tags']);
            $taggedSessions[] = $session;
        }
        return $taggedSessions;
    }
public function getSessionsByTag ( $ tag ) { $ taggedSessions = [ ] ; foreach ( $ this -> metaDataCache -> getByTag ( Session :: TAG_PREFIX . $ tag ) as $ sessionIdentifier => $ sessionInfo ) { $ session = new Session ( $ sessionIdentifier , $ sessionInfo [ 'storageIdentifier' ] , $ sessionInfo [ 'lastActivityTimestamp' ] , $ sessionInfo [ 'tags' ] ) ; $ taggedSessions [ ] = $ session ; } return $ taggedSessions ; }
Returns all sessions which are tagged by the specified tag.

@param string $tag A valid Cache Frontend tag
@return array A collection of Session objects or an empty array if tag did not match
@api
Returns all sessions which are tagged by the specified tag .