Sets the default expire time and unit
342820
public Expiring<T> withDefault(long expireTime, TimeUnit expireUnit) {
		checkArgument(expireTime > 0);
		this.defaultExpireTime = Optional.of(expireTime);
		this.defaultExpireUnit = Optional.of(expireUnit);
		return this;
	}
1048626
public synchronized static void setDefault(TimeZone timeZone) {
        defaultTimeZone = timeZone != null ? (TimeZone) timeZone.clone() : null;
    }
1191788
async def expire(self, name, time):
        
        if isinstance(time, datetime.timedelta):
            time = time.seconds + time.days * 24 * 3600
        return await self.execute_command('EXPIRE', name, time)
611187
def expire_at(self, _time):
        
        return self._client.expireat(self.key_prefix, round(_time))
949313
def set_cache_expiry(response):
    
    if response.cache_control.max_age is None and 'CACHE_DEFAULT_TIMEOUT' in config.cache:
        response.cache_control.max_age = config.cache['CACHE_DEFAULT_TIMEOUT']
    return response
1308028
def expires_at(self):
        """"""
        try:
            expires = min(sig.key_expiration for sig in itertools.chain(iter(uid.selfsig for uid in self.userids), self.self_signatures)
                          if sig.key_expiration is not None)

        except ValueError:
            return None

        else:
            return (self.created + expires)
1304369
public boolean setExpire(long seconds) {
		if(seconds <= 0)return true;
		try {
			if(!isBinary)return getJedisCommands(groupName).expire(key, (int)seconds) == 1;
			if(isCluster(groupName)){
				return getBinaryJedisClusterCommands(groupName).expire(keyBytes, (int)seconds) == 1;
			}
			return getBinaryJedisCommands(groupName).expire(keyBytes, (int)seconds) == 1;
		} finally {
			getJedisProvider(groupName).release();
		}

	}
948086
private void applyExpire(ExpireOperation operation) {
    context.setTimestamp(operation.timestamp());
    PrimaryBackupSession session = context.getSession(operation.session());
    if (session != null) {
      context.expireSession(session.sessionId().id());
    }
  }
869946
def __set_token_expired(self, value):
        """"""
        self._token_expired = datetime.datetime.now() + datetime.timedelta(seconds=value)
        return
514016
function setExpiry(key, ms, req) {
  var rval = this.getRawKey(key);
  if(rval === undefined) return 0;
  // expiry is in the past or now, delete immediately
  // but return 1 to indicate the expiry was set
  if(ms <= Date.now()) {
    this.delKey(key, req);
    return 1;
  }
  if(!this._expires[key]) {
    this._ekeys.push(key);
  }
  this._expires[key] = ms;
  rval.e = ms;
  return 1;
}
928140
def set_expire(self, new_expire, only_read=False):
        
        if not isinstance(new_expire, int) or new_expire < 0:
            self.logger.warning('Parameter new_expire %s must be positive number' % new_expire)
            return
        self.expire = new_expire
792620
def expire_at(time)
      time = (time.to_f * 1000).floor
      return coerce_bool(self.connection.pexpireat(@key, time))
    end
113072
function(key, expires) {
  var registry = getFile(cache.registry);
  registry[key] = expires;
  setFile(cache.registry, registry);
  log.info(format('Cache object %s set to expire at %s.', key, expires));
}
958178
def set(self, key, value, *, expire=0, pexpire=0, exist=None):
        
        if expire and not isinstance(expire, int):
            raise TypeError("expire argument must be int")
        if pexpire and not isinstance(pexpire, int):
            raise TypeError("pexpire argument must be int")

        args = []
        if expire:
            args[:] = [b'EX', expire]
        if pexpire:
            args[:] = [b'PX', pexpire]

        if exist is self.SET_IF_EXIST:
            args.append(b'XX')
        elif exist is self.SET_IF_NOT_EXIST:
            args.append(b'NX')
        fut = self.execute(b'SET', key, value, *args)
        return wait_ok(fut)
914875
def expire(self, name, time):
        
        with self.pipe as pipe:
            return pipe.expire(self.redis_key(name), time)
20116
function (name, value) {
      var date = new Date();
      date.setTime(date.getTime() + this.cookieTimeout);

      document.cookie = name + '=' + value + ';expires=' + date.toGMTString() + ';path=/';
    }
786072
public function setExpire($expire)
    {
        // Convert expiration time to a Unix timestamp
        if ($expire instanceof DateTime) {
            $expire = $expire->format('U');
        }

        if (!is_numeric($expire))
        {
            $expire = strtotime($expire);

            if ($expire === false || $expire === -1) {
                throw new InvalidArgumentException('The cookie expiration time is not valid.');
            }
        }

        $this->_expire = $expire;
        return $this;
    }