Refresh a key with new ttl
(without notifying watchers when using etcd 2.3+)

@param key to refresh
@param ttl to update key with
@return EtcdKeysRequest
541333
public EtcdKeyPutRequest refresh(String key, Integer ttl) {
    return new EtcdKeyPutRequest(client, key, retryHandler).refresh(ttl);
  }
1369837
def refresh(self, key):
        """"""
        s0 = self[key]
        s = self.backtrack(key)
        s.persist(**s0.metadata['persist_kwargs'])
992141
public void setInTTL(long ttl) throws JMSException {
    if (inTTL != ttl) {
      // Now verify that the value for TTL is valid.
      if (ttl < 0 || ttl > MfpConstants.MAX_TIME_TO_LIVE) {
        throw (JMSException) JmsErrorUtils.newThrowable(
           JMSException.class,
           "INVALID_VALUE_CWSIA0301",
           new Object[] {"timeToLive", ""+ttl},
           tc);
      }
      inTTL = ttl;
      recalcOutTTL();
    }
  }
336508
public function set($key, $value, $ttl)
    {
        return self::getCacheDriver()->set($key, $value, $ttl);
    }
719020
public function setResult($key, $result, $ttl)
    {
        if (!($ttl instanceof Ttl)) {
            $ttl = new Ttl($ttl);
        }

        $expirationTimestamp = time() + $ttl->getTtl();
        $value = new Value($result, $expirationTimestamp);

        $this->valueStore->set($key, $value, $ttl->getRealTtl());
    }
1034432
protected void scheduleTtl(K key, MapEntryValue value) {
    if (value.ttl() > 0) {
      value.timer = getScheduler().schedule(Duration.ofMillis(value.ttl()), () -> {
        entries().remove(key, value);
        publish(new AtomicMapEvent<>(AtomicMapEvent.Type.REMOVE, key, null, toVersioned(value)));
      });
    }
  }
72003
def update(self, ttl=values.unset):
        
        return self._proxy.update(ttl=ttl, )
1282931
public function createDir($key, $ttl = 0)
    {
        $data = ['dir' => 'true'];

        if ($ttl) {
            $data['ttl'] = $ttl;
        }

        return $this->httpPut($this->getKeyUrl($key), $data, ['prevExist' => 'false']);
    }
1368202
public function ttl($key, $db = -1)
    {
        if(-1 != $db) {
            $this->execute('select', array($db));
        }

        return $this->execute('ttl', array($key));
    }
1132545
@Override
    public synchronized void invalidate(String key, boolean fullExpire) {
        Entry entry = get(key);
        if (entry != null) {
            entry.softTtl = 0;
            if (fullExpire) {
                entry.ttl = 0;
            }
            put(key, entry);
        }

    }
650983
def ttl_for_access_token=(seconds)
      raise_if_authentication_failed!

      key = @key_for_access_token
      value = @value_for_access_token
      ApiWarden.redis { |conn| conn.set(key, value, ex: seconds) }
    end
84294
public function set($key, $value, $ttl = null)
    {
        if ($this->enabled()) {
            return $this->cache->save($key, $value, [NetteCache::EXPIRE => $this->makeExpiration($ttl)]);
        }

        return $value;
    }
1168708
public Result<V,E> put(
		K key,
		Refresher<? super K,? extends V,? extends E> refresher
	) {
		Result<V,E> result = runRefresher(refresher, key);
		put(key, refresher, result);
		return result;
	}
930573
@Override
    public CompletableFuture<V> getAndRefreshAsync(String key, int expireSeconds) {
        return (CompletableFuture) refreshAsync(key, expireSeconds).thenCompose(v -> getAsync(key));
    }
1108598
public void createDir(String key, int ttl, Boolean prevExist) throws EtcdClientException {
        Preconditions.checkNotNull(key);

        List<BasicNameValuePair> data = Lists.newArrayList();
        data.add(new BasicNameValuePair("dir", String.valueOf(true)));
        if (ttl > 0) {
            data.add(new BasicNameValuePair("ttl", String.valueOf(ttl)));
        }
        if (prevExist != null) {
            data.add(new BasicNameValuePair("prevExist", String.valueOf(prevExist)));
        }

        put(key, data, null, new int[]{200, 201});
    }
1190202
async def ttl(self, key, param=None):
        """"""
        identity = self._gen_identity(key, param)
        return await self.client.ttl(identity)
577592
public boolean refreshSession (String sessionKey, int expireDays)
        throws PersistenceException
    {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.DATE, expireDays);
        Date expires = new Date(cal.getTime().getTime());

        // attempt to update an existing session row, returning true if we found and updated it
        return (update("update sessions set expires = '" + expires + "' " +
                       "where authcode = " + JDBCUtil.escape(sessionKey)) == 1);
    }