Writes the memcached entry

@access	private
@return  boolean, true if it was an existing session, false if not
768219
protected function _write_memcached($session_id, $payload)
	{
		// write it to the memcached server
		if ($this->memcached->set($this->config['cookie_name'].'_'.$session_id, $payload, $this->config['expiration_time']) === false)
		{
			throw new \FuelException('Memcached returned error code "'.$this->memcached->getResultCode().'" on write. Check your configuration.');
		}
	}
709584
public function write($session_id, $session_data)
    {
        $result = false;

        if ($this->getTable()->isConnected())
        {
            $row = $this->_table->select($session_id, KDatabase::FETCH_ROW);

            if ($row->isNew()) {
                $row->id   = $session_id;
            }

            $row->time   = time();
            $row->data   = $session_data;
            $row->domain = ini_get('session.cookie_domain');
            $row->path   = ini_get('session.cookie_path');

            $result = $row->save();
        }

        return $result;
    }
232004
public function saveCacheListing() : bool
    {
        if (md5(json_encode($this->entryMetaData)) === $this->md5Sum) {
            return false;
        }

        return apcu_store(self::KEY_CACHE_LIST, $this->entryMetaData);
    }
395930
protected function write(array $keys, $expire = null)
    {
        foreach ($keys as $k => $v) {
            $k = sha1($k);
            $this->memcache->set($k, $v, 0, $expire);
        }

        return true;
    }
990452
public function write($key, $vars)
    {
        $data   = serialize(array('changed' => time(), 'ip' => $this->ip, 'vars' => $vars));
        $result = $this->memcache->set($key, $data, MEMCACHE_COMPRESSED, $this->lifetime + 60);

        if ($this->debug) {
            $this->debug('set', $key, $data, $result);
        }

        return $result;
    }
35082
private function _write_cache()
    {
        if (is_writable(dirname(dirname(dirname(__DIR__))).'/cache')) {
            @file_put_contents($this->_cache_file, $this->_use_json ?
                json_encode(array(
                    'hw' => array(
                        'pci' => $this->_pci_devices,
                        'usb' => $this->_usb_devices,
                    ),
                ))
                : serialize(array(
                    'hw' => array(
                        'pci' => $this->_pci_devices,
                        'usb' => $this->_usb_devices,
                    ),
            )));
        }
    }
520232
public static function write_close() {

        if ( self::$sessionState === self::SESSION_STARTED ) {
            self::$sessionState = self::SESSION_NOT_STARTED;

            return session_write_close();
        }

        return true;
    }
852223
public static function initialize()
    {
        if (self::$registered) {
            return true;
        }

        try {
            // initialize the connection to memcached
            if (is_null(self::cache())) {
                return false;
            }
            // register the wrapper
            stream_wrapper_register(self::PROTOCOL, 'Shpasser\GaeSupportL5\Storage\CacheFs');
            self::$registered = true;
        } catch (\RuntimeException $ex) {
            return false;
        }

        return true;
    }
40262
public static function 
    {

        if (self::$memcached) {
            return;
        }

        self::$memcached = new \Memcached();

        foreach (self::$config['memcached']['servers'] as $server) {
            extract(array_merge(self::$memcachedServerDefaults, $server));

            self::$memcached->addServers($host, $port, $persistent, $weight, $timeout);
        }
    }
544093
public function flush()
    {
        if (empty($this->memcache)) {
            return false;
        }

        $flushStatus = $this->memcache->flush();

        return $flushStatus;
    }
45364
public function write($id, $session_data)
	{
        if ($id === '' && $session_data === '') {
            return false;
        }

        $result = false;
        $session = $this->_getSession($id);

        if (isset($session)) {
            $result = $session->set('meta', $session_data)->save();
        } else {
            $result = $this->_repository->getEntity()
            ->set('sessionId', $id)
            ->set('meta', $session_data)
            ->save();
        }

        if ($result) {
            $this->_data = $session_data;
        }

		return $result;
	}
842937
public function do_write($session_id, $data, $ttl)
    {
        $params = session_get_cookie_params();

        $key = $this->_key ?: $this->_getKey();
        $payload = base64_encode(json_encode(['exp' => time() + $ttl, 'data' => $data]));
        $this->_di->cookies->set($session_id, $payload . '.' . md5($payload . $key), $params['lifetime'], $params['path'], $params['domain'],
            $params['secure']);

        return true;
    }
597339
public function write($id, $data)
    {
        return $this->memcached->set($this->prefix . $id, $data, 0, time() + $this->ttl);
    }
1312348
public function save()
    {

        if ($this->id) {
            $this->id = shmop_open($this->key, $this->mode, $this->permission, $this->size);
        }

        @shmop_write($this->id, serialize($this->data), $this->offset);

        return true;
    }
572131
public function write()
    {
        $current = $this->getUserAgent() + ['agent' => filter_input(INPUT_SERVER, 'HTTP_USER_AGENT'), 'ip' => $this->getClientIp()];
        $last = $this->getFileArray()->exists(0) ? $this->getFileArray()->get(0) : [];

        //Removes the first record (last in order of time), if it has been saved
        //  less than an hour ago and if the user agent data are the same
        if ($last && (new Time($last->get('time')))->modify('+1 hour')->isFuture()
            && $last->extract(['agent', 'browser', 'ip', 'platform', 'version']) == $current
        ) {
            $this->getFileArray()->delete(0);
        }

        //Adds the current request, takes only a specified number of records and writes
        return $this->getFileArray()->prepend(new Entity($current + ['time' => new Time]))
            ->take(getConfig('users.login_log'))
            ->write();
    }
854396
private function writeCache($data)
	{
		$this->cacheMap[$this->hash] = time();
		$handle = fopen($this->cacheMapFile, "w");
		flock($handle, LOCK_EX);
		$write1 = fwrite($handle, 
			json_encode(
				$this->cacheMap, 
				JSON_UNESCAPED_SLASHES
			)
		);
		fclose($handle);
		$handle = fopen($this->cacheFile, "w");
		flock($handle, LOCK_EX);
		$write2 = fwrite($handle, $data);
		fclose($handle);
		return (
			(bool) $write1 && (bool) $write2
		);
	}
742463
private function connect()
    {
        $memcache = new Memcached();
        $memcache->addServer($this->host, $this->port);

        if (null !== $this->prefix) {
            $memcache->setOption(Memcached::OPT_PREFIX_KEY, $this->prefix);
        }

        $this->memcached = $memcache;
    }