Set a key/value pair in the cache service
341273
def set_(key, value, service=None, profile=None):  # pylint: disable=W0613
    '''
    
    '''
    key, profile = _parse_key(key, profile)
    cache = salt.cache.Cache(__opts__)
    cache.store(profile['bank'], key, value)
    return get(key, service, profile)
1032431
def []=(key, value)

      raise(
        ArgumentError.new('use context#add_service to register services')
      ) if SERVICE_PREFIX.match(key)

      @storage.put(conf.merge(key => value))
        # TODO blindly trust the put ? retry in case of failure ?

      value
    end
821025
def put(self, key, value):
    '''
    '''
    self.cache_datastore.put(key, value)
    self.child_datastore.put(key, value)
851456
def set(self, key, value, *args, **kwargs):
        
        if self.cfg.jsonpickle:
            value = jsonpickle.encode(value)
        return self.conn.set(key, value, *args, **kwargs)
626131
def set(self, key, value):
        
        task = Task.current_task()
        try:
            context = task._context
        except AttributeError:
            task._context = context = {}
        context[key] = value
332813
def set_(key, value, profile=None):
    '''
    
    '''
    if not profile:
        return False
    redis_kwargs = profile.copy()
    redis_kwargs.pop('driver')
    redis_conn = redis.StrictRedis(**redis_kwargs)
    return redis_conn.set(key, value)
841995
def setConfigKey(key, value):
		
		configFile = ConfigurationManager._configFile()
		return JsonDataManager(configFile).setKey(key, value)
946777
def set(self, key, val):
    
    self._create_file_if_none_exists()
    with open(self.filename, 'r+b') as file_object:
      cache_pickle = pickle.load(file_object)
      cache_pickle[key] = val
      file_object.seek(0)
      pickle.dump(cache_pickle, file_object)
17589
function _cacheData(key, value) {
    cache[key] = { timeStamp: _getTimeStamp(), value: value };
    _deletePromiseWaiting(key);
    return value;
}
1103459
def update_cache_settings(self, service_id, version_number, name_key, **kwargs):
		""""""
		body = self._formdata(kwargs, FastlyCacheSettings.FIELDS)
		content = self._fetch("/service/%s/version/%d/cache_settings/%s" % (service_id, version_number, name_key), method="PUT", body=body)
		return FastlyCacheSettings(self, content)
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))
}
413703
def set_value(self, key, field, value):
        """"""
        self._db.hset(key, field, value)
505949
def set(key, value, timeout = -1, adapter = MemoryAdapter):
	'''
	
	'''
	if adapter(timeout = timeout).set(key, pickle.dumps(value)):
		return value
	else:
		return None
610049
def set_cache(self, value):
        
        value.update(self.cache)
        return self.cache_backend.set(self.cache_key, value)
487220
def setCachedDataKey(engineVersionHash, key, value):
		
		cacheFile = CachedDataManager._cacheFileForHash(engineVersionHash)
		return JsonDataManager(cacheFile).setKey(key, value)
1010124
def set(self, key, value):
        

        data = self._load_file()
        data[key] = value
        self._save_file(data)
1123347
public void setCache(String cacheName, String cacheKey, Object object) {
        Cache cache = cacheManager.getCache(cacheName);
        if (cache == null) {
            return;
        }
        cache.put(new Element(cacheKey, object));
    }