Set the value of key ``name`` to ``value`` that expires in ``time_ms``
        milliseconds. ``time_ms`` can be represented by an integer or a Python
        timedelta object
160077
def psetex(self, name, value, time_ms):
        
        with self.pipe as pipe:
            return pipe.psetex(self.redis_key(name), time_ms=time_ms,
                               value=self.valueparse.encode(value=value))
157936
def set(self, val, lifetime=None):
        
        cache.set(self.key,
                  (json.dumps(val) if self.serialize else val),
                  lifetime or settings.DEFAULT_CACHE_EXPIRE_TIME)
        return val
551779
def set(self, key, value):
        
        return uwsgi.cache_set(key, value, self.timeout, self.name)
1087912
def put(self, key, value, expire=None, timeout=1, is_async=True, only_read=False):
        
        if key in self.cache_items:
            self.cache_items.pop(key)
        if expire is None:
            expire = self.expire
        self.cache_items[key] = CacheItem(key=key, value=value, expire=expire)
704649
def update(self, value, timestamp=None):
        

        if timestamp is None:
            timestamp = self.current_time_in_fractional_seconds()
        self.rescale_if_needed()
        priority = self.weight(timestamp - self.start_time) / random.random()
        self.values[priority] = value
        if len(self.values) > self.size:
            self.values.remove_min()
310703
def set_value(self, value: datetime):
        
        assert isinstance(value, datetime)

        self.value = value
882024
def set(self, key, value, timeout=None):
        
        key = self.make_key(key)
        if timeout is None:
            timeout = self.default_timeout

        if self.debug:
            return True

        pickled_value = pickle.dumps(value)
        self.metrics['writes'] += 1
        if timeout:
            return self.database.setex(key, int(timeout), pickled_value)
        else:
            return self.database.set(key, pickled_value)
845159
def store(self, key, value):
        
        self.client.set(key, value, time=self.timeout)
279116
def set(self, instance, value, **kwargs):
        
        val = get_date(instance, value)
        super(DateTimeField, self).set(instance, val, **kwargs)
594078
def value(self, key, timestamp=None, namespace=None):
        """"""
        return self.make_context(key=key, end=timestamp,
                                 namespace=namespace).value()
702577
def expire(key, seconds, host=None, port=None, db=None, password=None):
    '''
    
    '''
    server = _connect(host, port, db, password)
    return server.expire(key, seconds)
1331626
function set(key, value /*, exflag, secs, pxflag, ms, xflag, req*/) {
  var i
    , arg
    // expiry flag: EX | PX
    , flag
    // expiry value: number
    , expiry
    // exists flag: NX | XX
    , xflag
    // request object when available
    , req;

  for(i = 0;i < arguments.length;i++) {
    arg = arguments[i];
    if(typeof arg === 'object') {
      req = arg;
    }else if(arg === Constants.NX || arg === Constants.XX) {
      xflag = arg;
    }else if(arg === Constants.EX || arg === Constants.PX) {
      flag = arg;
      expiry = arguments[++i];
    }
  }
  return this.setKey(key, value, flag, expiry, xflag, req) || null;
}
1081914
def timestamp(self, name, value):
        
        for counter in self._counters:
            counter.timestamp(name, value)
1331351
def setbit(self, name, offset, value):
        
        with self.pipe as pipe:
            return pipe.setbit(self.redis_key(name), offset, value)
682061
function set (key, value, time = 60) {
  let expireTime
  const cacheKey = `${prefix}${key}`
  const expireKey = `${expire}${key}`

  if (typeof time === 'number') {
    expireTime = dateAdd(Date.now(), 'minute', time)
  } else if (time !== null && typeof time === 'object' && time.interval && time.units) {
    expireTime = dateAdd(Date.now(), time.interval, time.units)
  } else {
    throw new Error('Invalid time provided for set')
  }

  return storage.set(expireKey, expireTime).then(() => storage.set(cacheKey, value))
}
1132084
def expire_at(self, key, _time):
        
        return self._client.expireat(self.get_key(key), round(_time))
1202885
def expire_key(self, key):
        '''
        
        '''
        value = self.base_dict[key]
        del self[key]
        if self.callback is not None:
            self.callback(
                key, value, *self.callback_args, **self.callback_kwargs)