Store a value in the xblock's cache, creating the cache if necessary.
176346
def _set_cached_value(self, xblock, value):
        """"""
        # pylint: disable=protected-access
        if not hasattr(xblock, '_field_data_cache'):
            xblock._field_data_cache = {}
        xblock._field_data_cache[self.name] = value
500084
public V put(K key, V value){
		writeLock.lock();
		try {
			cache.put(key, value);
		} finally {
			writeLock.unlock();
		}
		return value;
	}
350936
public void putObect(StringKey ckey, Object value) {
		if (ckey == null)
			return;
		if (cache.contain(ckey.getKey()))
			return;
		cache.put(ckey.getKey(), new CacheableWrapper(ckey.getDataKey(), value));
	}
105033
void storeBlock(BlockId blockId, ByteBuffer block) throws IOException {
        synchronized (m_accessLock) {
            if (m_blockPathMap.containsKey(blockId)) {
                throw new IllegalArgumentException("Request to store block that is already stored: "
                                                    + blockId.toString());
            }

            int origPosition = block.position();
            block.position(0);
            Path blockPath = makeBlockPath(blockId);
            try (SeekableByteChannel channel = Files.newByteChannel(blockPath, OPEN_OPTIONS, PERMISSIONS)) {
                channel.write(block);
            }
            finally {
                block.position(origPosition);
            }

            m_blockPathMap.put(blockId, blockPath);
        }
    }
842297
function cache($key, $value): void {
    $viewRenderer = $this->viewRenderer;
    if (!$viewRenderer->enableCaching) eval("?>$value");
    else {
      /** @var \yii\caching\Cache $cache */
      $cache = $viewRenderer->cache;
      $cache->set([__CLASS__, $key], $value, $viewRenderer->cachingDuration);
      $this->load($key);
    }
  }
1276362
void store(IndexReader reader, String field, String prefix, ValueIndex value)
   {
      synchronized (cache)
      {
         Map<Key, ValueIndex> readerCache = cache.get(reader);
         if (readerCache == null)
         {
            readerCache = new HashMap<Key, ValueIndex>();
            cache.put(reader, readerCache);
         }
         readerCache.put(new Key(field, prefix), value);
      }
   }
663975
function cacheSet(key, options, val) {
    if (shouldCache(options)) {
      return;
    }

    if (self.options.cache === 'memory') {
      self.cache[key] = val;
      return;
    }

    self.options.cache.set(key, val);
  }
901120
public synchronized ValT put(KeyT key, ValT value) {
        if (isDiskCacheEnabled) {
            cacheToDisk(key, value);
        }

        return cache.put(key, value);
    }
540092
public Integer cache(Object value) {
        synchronized (this) {
            Integer key = keys.get(value);
            // Already cached?
            if (key != null) return key;
            key = next;
            cache.put(key, value);
            keys.put(value, key);
            next++;
            return key;
        }
    }
983907
def _mark_dirty(self, xblock, value):
        """"""
        # pylint: disable=protected-access

        # Deep copy the value being marked as dirty, so that there
        # is a baseline to check against when saving later
        if self not in xblock._dirty_fields:
            xblock._dirty_fields[self] = copy.deepcopy(value)
1210107
def add(name, value, created_on)
      meter = fetch(name, nil)

      # If the name isn't cached, cache it and return
      return cache(name, value, created_on) unless meter

      # If the cached value is for a different day, flush it, cache the new value and return
      if meter.created_on != created_on
        flush(name)
        cache(name, value, created_on)
        return
      end

      # Add the new value to the cached value and flush if expired
      meter.value += value
      flush(name) if meter.expired?
    end
845159
def store(self, key, value):
        
        self.client.set(key, value, time=self.timeout)
459127
def _set_cache_value(self, key, value, type):
        """"""
        if type is bool:
            if value:
                self[key] = None
            else:
                self.pop(key, None)
        else:
            if value is None:
                self.pop(key)
            elif value is True:
                self[key] = None
            else:
                self[key] = value
1196915
private CacheEntry getCacheEntry(Object value, boolean create)
  {

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.entry(
        this,cclass,
        "getCacheEntry",
        new Object[] { value, new Boolean(create), matchCache });

    CacheEntry e = (CacheEntry) matchCache.get(value);
    if (e == null)
    {
      if (create)
      {
        e = new CacheEntry();
        // The following method call may stimulate multiple callbacks to the shouldRetain
        // method if the Hashtable is at the rehash threshold.
        matchCache.put(value, e);
        cacheCreates++;
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      tc.exit(this,cclass, "getCacheEntry", e);

    return e;
  }
345584
def store(key, value, options = {})
      @cache.store(key, value, options)
      @adapter.store(key, value, options)
    end
291420
def store_atomic(self, value, ptr, ordering, align):
        
        if not isinstance(ptr.type, types.PointerType):
            raise TypeError("cannot store to value of type %s (%r): not a pointer"
                            % (ptr.type, str(ptr)))
        if ptr.type.pointee != value.type:
            raise TypeError("cannot store %s to %s: mismatching types"
                            % (value.type, ptr.type))
        st = instructions.StoreAtomicInstr(self.block, value, ptr, ordering, align)
        self._insert(st)
        return st
843515
def append(self, value):
        """"""
        len_self = self.redis.rpush(self.key, self._pickle(value))

        if self.writeback:
            self.cache[len_self - 1] = value