Stores vector and JSON-serializable data in bucket with specified key.
198947
def store_vector(self, hash_name, bucket_key, v, data):
        
        self._add_vector(hash_name, bucket_key, v, data, self.redis_object)
550573
private void put(String key, JSONObject jsonObject) {
        if (jsonStore.size() > maxCache || jsonStore.size() == Integer.MAX_VALUE) {
            // 清除缓存
            jsonStore.clear();
        }
        jsonStore.put(key, jsonObject);
    }
391183
def forever(self, key, value):
        
        value = self.serialize(value)

        self._redis.set(self._prefix + key, value)
886305
def store(bank, key, data):
    '''
    
    '''
    redis_server = _get_redis_server()
    redis_pipe = redis_server.pipeline()
    redis_key = _get_key_redis_key(bank, key)
    redis_bank_keys = _get_bank_keys_redis_key(bank)
    try:
        _build_bank_hier(bank, redis_pipe)
        value = __context__['serial'].dumps(data)
        redis_pipe.set(redis_key, value)
        log.debug('Setting the value for %s under %s (%s)', key, bank, redis_key)
        redis_pipe.sadd(redis_bank_keys, key)
        log.debug('Adding %s to %s', key, redis_bank_keys)
        redis_pipe.execute()
    except (RedisConnectionError, RedisResponseError) as rerr:
        mesg = 'Cannot set the Redis cache key {rkey}: {rerr}'.format(rkey=redis_key,
                                                                      rerr=rerr)
        log.error(mesg)
        raise SaltCacheError(mesg)
550229
def store_vector(self, v, data=None):
        
        # We will store the normalized vector (used during retrieval)
        nv = unitvec(v)
        # Store vector in each bucket of all hashes
        for lshash in self.lshashes:
            for bucket_key in lshash.hash_vector(v):
                #print 'Storying in bucket %s one vector' % bucket_key
                self.storage.store_vector(lshash.hash_name, bucket_key,
                                          nv, data)
1340096
@Override
	public Serializable put(String key, Serializable value) {
		Serializable ret = super.put(key, value);
		notifyDataChanged();
		return ret;
	}
1190240
public static Function newStoredJsFunction(String bucket, String key)
    {
        return new Builder().withBucket(bucket).withKey(key).build();
    }
455983
public V put (int key, V value)
    {
        // check to see if we've passed our load factor, if so: resize
        ensureCapacity(_size + 1);

        int index = keyToIndex(key);
        Record<V> rec = _buckets[index];

        // either we start a new chain
        if (rec == null) {
            _buckets[index] = new Record<V>(key, value);
            _size++; // we're bigger
            return null;
        }

        // or we replace an element in an existing chain
        Record<V> prev = rec;
        for (; rec != null; rec = rec.next) {
            if (rec.key == key) {
                V ovalue = rec.value;
                rec.value = value; // we're not bigger
                return ovalue;
            }
            prev = rec;
        }

        // or we append it to this chain
        prev.next = new Record<V>(key, value);
        _size++; // we're bigger
        return null;
    }
897540
function(key, value) {
            var s = Storage.storage();
            if (s == null) {
                return null;
            }
            s[key] = JSON.stringify(value);
            return Storage.get(key);
        }
435465
@Override
    public void store(T key, INDArray object) {
        INDArray toStore;
        if (useInplaceCompression) {
            compressor.compressi(object);
            toStore = object;
        } else {
            toStore = compressor.compress(object);
        }

        if (emulateIsAbsent)
            lock.writeLock().lock();

        compressedEntries.put(key, toStore);

        if (emulateIsAbsent)
            lock.writeLock().unlock();
    }
1024729
def put(key, data)
      queue = queues(key)
      return nil unless queue

      @stats[:current_bytes] += data.size
      @stats[:total_items] += 1

      queue.push(data)

      return true
    end
331372
function (key, value) {
                var mappedKey = getMappedKey(key, true);

                storage.setAttribute(mappedKey, value);
                storage.save("JSONPersist");
            }
741458
function (key) {
                var r = []
                this.all(function(a) {    
                    for (var i = 0, l = a.length; i < l; i++) {
                        if (a[i] != key) r.push(a[i])
                    } 

                    var _set = {}
                    _set[this.key] = JSON.stringify(r) 
                    storage.set(_set)
                })
            }
845159
def store(self, key, value):
        
        self.client.set(key, value, time=self.timeout)
161511
function(_data,_key,_map){
            if (_u._$isArray(_data)){
                _map[_key] = JSON.stringify(_data);
            }
        }
1111223
function(key, object) {

          // Convert object to JSON and store in localStorage
          var json = JSON.stringify(object);
          persistenceStrategy.set(key, json);

          // Then store it in the object cache
          objectCache[key] = object;
        }
546528
final public Vector vector(K key)
    {
        Vector vector = storage.get(key);
        if (vector == null) return null;
        return vector;
    }