Set the MemCached settings.
979865
private function setSettings()
    {
        // Use faster compression if available
        if (Memcached::HAVE_IGBINARY) {
            $this->memcached->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_IGBINARY);
        }
        $this->memcached->setOption(Memcached::OPT_DISTRIBUTION, Memcached::DISTRIBUTION_CONSISTENT);
        $this->memcached->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
        $this->memcached->setOption(Memcached::OPT_NO_BLOCK, true);
        $this->memcached->setOption(Memcached::OPT_TCP_NODELAY, true);
        $this->memcached->setOption(Memcached::OPT_COMPRESSION, false);
        $this->memcached->setOption(Memcached::OPT_CONNECT_TIMEOUT, 2);
    }
427956
public static function configure($memcacheContainer = null) {
    $handler = new MemcacheSessionHandler($memcacheContainer);

    session_set_save_handler($handler, true);

    /**
     * Set so that it is clear that Memcache is being used for session handling,
     * as retrieving session.save_handler just returns "user".
     */
    session_save_path("Memcache");
  }
610049
def set_cache(self, value):
        
        value.update(self.cache)
        return self.cache_backend.set(self.cache_key, value)
922121
protected function registerMemcachedBucketCacheDriver(): void
    {
        $this->app['cache']->extend('couchbase-memcached', function ($app, $config) {
            $prefix = $app['config']['cache.prefix'];
            $credential = $config['sasl'] ?? [];
            $memcachedBucket = $this->app['couchbase.memcached.connector']
                ->connect($config['servers']);

            return new Repository(
                new MemcachedBucketStore(
                    $memcachedBucket,
                    strval($prefix),
                    $config['servers'],
                    $credential
                )
            );
        });
    }
4721
def set(self, key, val, bucket):
        

        if bucket not in self._cache:
            self._cache[bucket] = {}

        self._cache[bucket][key] = val
5289
def set_settings(self, releases=None, default_release=None):
        """"""
        if (self._storage is None or
                getattr(self, 'releases', {}) != releases or
                getattr(self, 'default_release', '') != default_release):
            self._storage = {}
            self.releases = releases or {}
            self.default_release = default_release
215810
def _use_memcache(self, key, options=None):
    
    flag = ContextOptions.use_memcache(options)
    if flag is None:
      flag = self._memcache_policy(key)
    if flag is None:
      flag = ContextOptions.use_memcache(self._conn.config)
    if flag is None:
      flag = True
    return flag
141745
public static function set($key, $value) {
		$memcached = self::connect();
		$config = \Skeleton\Object\Config::$cache_handler_config;
		$memcached->add($key, $value, $config['expire']);
	}
1031359
def set_memcache_policy(self, func):
    
    if func is None:
      func = self.default_memcache_policy
    elif isinstance(func, bool):
      func = lambda unused_key, flag=func: flag
    self._memcache_policy = func
896503
def _set_cache_(self, attr):
        """"""
        if attr == "size":
            oinfo = self.repo.odb.info(self.binsha)
            self.size = oinfo.size
            # assert oinfo.type == self.type, _assertion_msg_format % (self.binsha, oinfo.type, self.type)
        else:
            super(Object, self)._set_cache_(attr)
1045177
def set(self, key, val, time=0, min_compress_len=0):
        """"""
        if not self.servers:
            return

        key = self._qualified_key(key)
        hashed_key = self.key_hasher(key)
        val = (key, val)

        self.client.set(key=hashed_key,
                        val=val,
                        time=time,
                        min_compress_len=min_compress_len)
        self.logger("SET: %s", key)
945134
def write(key, data = nil, parameters = {}, conditions = {})
      if writable?(key, parameters, conditions)
        begin
          @memcached.set(normalize(key, parameters), data, expire_time(conditions))
          true
        rescue
          nil
        end
      end
    end
375897
public function memcacheSet($key, $value, $expiration = null)
    {
        if ($this->isSingle()) {
            MemcacheKit::set($key, $value, $expiration);
        }
    }
206776
def set_value(self, value):
        """"""
        cache, cache_key = self._get_cache_plus_key()
        cache.set(cache_key, value)
459127
def _set_cache_value(self, key, value, type):
        """"""
        if type is bool:
            if value:
                self[key] = None
            else:
                self.pop(key, None)
        else:
            if value is None:
                self.pop(key)
            elif value is True:
                self[key] = None
            else:
                self[key] = value
228919
protected function _setOptions()
    {
        $this->_Memcached->setOption(Memcached::OPT_LIBKETAMA_COMPATIBLE, true);

        $serializer = strtolower($this->_config['serialize']);
        if (!isset($this->_serializers[$serializer])) {
            throw new InvalidArgumentException(
                sprintf('%s is not a valid serializer engine for Memcached', $serializer)
            );
        }

        if ($serializer !== 'php' &&
            !constant('Memcached::HAVE_' . strtoupper($serializer))
        ) {
            throw new InvalidArgumentException(
                sprintf('Memcached extension is not compiled with %s support', $serializer)
            );
        }

        $this->_Memcached->setOption(
            Memcached::OPT_SERIALIZER,
            $this->_serializers[$serializer]
        );

        // Check for Amazon ElastiCache instance
        if (defined('Memcached::OPT_CLIENT_MODE') &&
            defined('Memcached::DYNAMIC_CLIENT_MODE')
        ) {
            $this->_Memcached->setOption(
                Memcached::OPT_CLIENT_MODE,
                Memcached::DYNAMIC_CLIENT_MODE
            );
        }

        $this->_Memcached->setOption(
            Memcached::OPT_COMPRESSION,
            (bool)$this->_config['compress']
        );
    }
1090426
def cache_set(self, to_cache):
        
        self.cache.set(self.cache_key, to_cache, self.expire_time)