set :: String, String, expires: Time? -> nil

 Sets the specified key to the specified value. Returns nil. Raises on
 error.

 Example:

   kv.set("foo", "bar")
     # => nil
341082
def set(key, value, expires: nil)
      validate_key(key)
      validate_value(value)

      mset({ key => value }, expires: expires)
    end
569972
function set(key, val){
  return null == val
    ? storage.removeItem(key)
    : storage.setItem(key, JSON.stringify(val));
}
910864
def set(self, id, value):
        
        return self.kv.set(self.key_name(id), value)
362796
@SuppressWarnings("unchecked")
  public final boolean set(final String key, final int exp, final Object value, final long timeout)
      throws TimeoutException, InterruptedException, MemcachedException {
    return this.set(key, exp, value, this.transcoder, timeout);
  }
877427
def set(key, value)
      UI.crash!("Key '#{key}' must be a symbol. Example :#{key}.") unless key.kind_of?(Symbol)
      option = option_for_key(key)

      unless option
        UI.user_error!("Could not find option '#{key}' in the list of available options: #{@available_options.collect(&:key).join(', ')}")
      end

      option.verify!(value)

      @values[key] = value
      true
    end
1100140
def set(key, value)
      method_name = "validate_#{key}"
      send(method_name.to_sym, value) if respond_to?(method_name.to_sym)
      @data[key.to_s] = value
    end
907035
def set_(key, value, profile=None):
    '''
    
    '''
    conn = salt.utils.memcached.get_conn(profile)
    time = profile.get('expire', DEFAULT_EXPIRATION)
    return salt.utils.memcached.set_(conn, key, value, time=time)
785409
function set(key, value) {
  const entry = this.get(key, true);
  let oldvalue;
  if (entry) {
    oldvalue = entry.value;
    entry.value = value;
  } else {
    oldvalue = this.put(key, value);
    if (oldvalue) oldvalue = oldvalue.value;
  }
  return oldvalue;
}
312368
def set(key, opts = nil)
      fail ArgumentError, 'Second argument must be a hash' unless opts.is_a?(Hash)
      path  = key_endpoint + key
      payload = {}
      [:ttl, :value, :dir, :prevExist, :prevValue, :prevIndex].each do |k|
        payload[k] = opts[k] if opts.key?(k)
      end
      response = api_execute(path, :put, params: payload)
      Response.from_http_response(response)
    end
721905
def set_ttl(self, key, ttl):
        
        return self._client.expire(self.get_key(key), ttl)
828982
def set(key, value = nil, &block)
      logger.warn "Warning: `set :#{key}` is deprecated. Use `config[:#{key}] =` instead."

      value = block if block_given?
      config[key] = value
    end
636063
@Override
    public void set(String key, Object value, int expiration) {
        Element element = new Element(key, value);
        if (expiration == 0) {
            element.setEternal(true);
        }
        element.setTimeToLive(expiration);
        cache.put(element);
    }
1281336
def expireat(self, key, when):
        """"""
        expire_time = datetime.fromtimestamp(when)
        key = self._encode(key)
        if key in self.redis:
            self.timeouts[key] = expire_time
            return True
        return False
1132084
def expire_at(self, key, _time):
        
        return self._client.expireat(self.get_key(key), round(_time))
1284035
function(key, value, expiration) {

            // set item
            var ret = this._storage.setItem(key, value);

            // set expiration timestamp (only if defined)
            if (expiration) {
                this.updateExpiration(key, expiration);
            }

            // return set value return value
            return ret;
        }
188985
def init(key, value)
      with_failure_grace(value) {
        @redis.set(key, value) if get(key, nil).nil?
      }
    end
421803
def set(self, key, value, **kw):
        

        self.impl.set(key, value, **self._get_cache_kw(kw, None))