public function persist($userId = null, $callId = null)
    {
        if ($userId && $callId) {
            $keys = [$this->getCacheKey($userId, $callId)];
        } else {
            $keys = array_keys($this->cache);
        }

        $success = true;
        foreach ($keys as $key) {
            if (!$this->persistCacheEntry($key)) {
                $success = false;
            }
        }
        return $success;
    }
public function persist($userId = null, $callId = null)
    {
        if ($userId && $callId) {
            $keys = [$this->getCacheKey($userId, $callId)];
        } else {
            $keys = array_keys($this->cache);
        }

        $success = true;
        foreach ($keys as $key) {
            if (!$this->persistCacheEntry($key)) {
                $success = false;
            }
        }
        return $success;
    }
public function persist ( $ userId = null , $ callId = null ) { if ( $ userId && $ callId ) { $ keys = [ $ this -> getCacheKey ( $ userId , $ callId ) ] ; } else { $ keys = array_keys ( $ this -> cache ) ; } $ success = true ; foreach ( $ keys as $ key ) { if ( ! $ this -> persistCacheEntry ( $ key ) ) { $ success = false ; } } return $ success ; }
Sends the changes to the storage.

@param string $userId
@param string $callId
@return bool
Sends the changes to the storage .