update a session's data, update the ttl
182400
function(callback){
			if(!this.id){
				return process.nextTick(function(){
					callback(new Error("Invalid session ID"));
				});
			}
			options.client.setex(options.keyspace + this.id, options.maxAge, JSON.stringify(serializeSession(this)), callback);
		}
730341
def update(access_key, resource_policy, is_admin, is_active,  rate_limit):
    '''
    
    '''
    with Session() as session:
        try:
            data = session.KeyPair.update(
                access_key,
                is_active=is_active,
                is_admin=is_admin,
                resource_policy=resource_policy,
                rate_limit=rate_limit)
        except Exception as e:
            print_error(e)
            sys.exit(1)
        if not data['ok']:
            print_fail('KeyPair creation has failed: {0}'.format(data['msg']))
            sys.exit(1)
        print('Key pair is updated: ' + access_key + '.')
721905
def set_ttl(self, key, ttl):
        
        return self._client.expire(self.get_key(key), ttl)
841216
function update(sessionId, info) {
        sessionIdCache[sessionId] = info;

        db.collection('trackedUsersCache').update({
            _id: sessionId,
        }, { $set: {
            info: info,
        }}, {
            upsert: true
        }, (err) => {
            if (errorHandler.dbErrorCatcher(err)) { return false; }
            return true;
        });

    }
621129
def update(gandi, fqdn, name, type, value, ttl, file):
    
    domains = gandi.dns.list()
    domains = [domain['fqdn'] for domain in domains]
    if fqdn not in domains:
        gandi.echo('Sorry domain %s does not exist' % fqdn)
        gandi.echo('Please use one of the following: %s' % ', '.join(domains))
        return

    content = ''
    if file:
        content = file.read()
    elif not sys.stdin.isatty():
        content = click.get_text_stream('stdin').read()

    content = content.strip()
    if not content and not name and not type and not value:
        click.echo('Cannot find parameters for zone content to update.')
        return

    if name and type and not value:
        click.echo('You must provide one or more value parameter.')
        return

    result = gandi.dns.update_record(fqdn, name, type, value, ttl, content)
    gandi.echo(result['message'])
466428
def _update_session_expiration(self):
        

        session_time = oz.settings["session_time"]

        if session_time:
            self.redis().expire(self._session_key, session_time)
334715
def update_metadata(session, path=DATA_PATH):
    """"""
    with open(os.path.join(path, 'games.json')) as handle:
        games = json.loads(handle.read())
     
    for key, data in get_metadata(session, games).items():
        with open(os.path.join(path, '{}.json'.format(key)), 'w') as handle:
           handle.write(json.dumps(data, indent=2))
1356939
def reload(self):
        """"""
        if time.time() - self.updated > self.ttl:
            self.force_reload()
1318207
def set_session_info(self, info):
        '''
        
        '''
        if not self.info:
            self.info = SessionInfo()
            info_d = self.info.as_dict()
            ks = []
            vs = []
            for k, v in info_d.items():
                ks.append(k)
                vs.append(v)
            self.insert(ks, vs)
        changed = self.info.copy(info)
        if changed:
            self.update(self.info.as_dict())
1241137
def _update_record(self, record_id, name, address, ttl):
        """"""
        data = json.dumps({'record': {'name': name,
                                      'content': address,
                                      'ttl': ttl}})
        headers = {'Content-Type': 'application/json'}
        request = self._session.put(self._baseurl + '/%d' % record_id,
                                    data=data, headers=headers)
        if not request.ok:
            raise RuntimeError('Failed to update record: %s - %s' %
                               (self._format_hostname(name), request.json()))
        record = request.json()
        if 'record' not in record or 'id' not in record['record']:
            raise RuntimeError('Invalid record JSON format: %s - %s' %
                               (self._format_hostname(name), request.json()))
        return record['record']
175263
def set_session_value(self, name, value):
        """"""

        self.redis().hset(self._session_key, name, value)
        self._update_session_expiration()
874944
public function do_touch($session_id, $ttl)
    {
        /** @var \ManaPHP\DbInterface $db */
        $db = $this->_di->getShared($this->_db);

        $field_values = [
            'user_id' => $this->identity->getId(0),
            'client_ip' => $this->request->getClientIp(),
            'updated_time' => time(),
            'expired_time' => $ttl + time()
        ];

        return $db->update($this->_source, $field_values, ['session_id' => $session_id]) > 0;
    }
631124
def set_idle_ttl(cls, pid, ttl):
        
        with cls._lock:
            cls._ensure_pool_exists(pid)
            cls._pools[pid].set_idle_ttl(ttl)
617629
public EtcdKeyPutRequest refresh(Integer ttl) {
    this.requestParams.put("refresh", "true");
    this.prevExist(true);
    return ttl(ttl);
  }
989075
def _update_data_dict(self, data_dict, back_or_front):
        
        data_dict['back_or_front'] = back_or_front
        # The percentage of used sessions based on 'scur' and 'slim'
        if 'slim' in data_dict and 'scur' in data_dict:
            try:
                data_dict['spct'] = (data_dict['scur'] / data_dict['slim']) * 100
            except (TypeError, ZeroDivisionError):
                pass
1103351
def update(self, other):
        """"""

        self.update_ttl(other.ttl)
        super(Rdataset, self).update(other)
150711
public function updateLastAction ()
	{
		
		$arr	= $this->getSessionData ();
		
		$this->lastAction		= time ();
		$arr['last_action']		= $this->lastAction;
		
		$this->session ()->set (get_called_class (), serialize ($arr));
		
	}