A put with only the key, value provided acts as an update to the cache and
the entry retains the same creation time to live in the cache.
To do an insert action to the cache, see put(key,value,int,int,int,Object).
779250
@Override
    public Object put(String key, Object value) {
        return update(String.valueOf(key), value);
    }
226839
function (key, value) {
        var index = this.indexOfKey(key);

        if (index >= 0) {
            this.slot.values[index] = value;
            return;
        }

        this.insert(~index, key, value);
    }
500084
public V put(K key, V value){
		writeLock.lock();
		try {
			cache.put(key, value);
		} finally {
			writeLock.unlock();
		}
		return value;
	}
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;
    }
724723
@Override
    public Object put(Object key, Object value, int priority, long timeToLive, int sharingPolicy, Object dependencyIds[]) {
        return insert(String.valueOf(key), value);
    }
1065392
public synchronized Object put(final String key, final Object value) {
		try {
			if (maxCacheSize == 0) {
				return null;
			}

			// if the key isn't in the cache and the cache is full...
			if (!super.containsKey(key) && !list.isEmpty()
					&& list.size() + 1 > maxCacheSize) {
				final Object deadKey = list.removeLast();
				super.remove(deadKey);
			}

			updateKey(key);
		} catch (Exception e) {
			log.log(Level.SEVERE, "put", e);
		}
		return super.put(key, value);
	}
289683
public Object put(Object key, Object value)
    {
        synchronized (_cacheL2)
        {
            _cacheL2.put(key, value);

            // not really a miss, but merge to avoid big increase in L2 size
            // (it cannot be reallocated, it is final)
            mergeIfNeeded();
        }

        return value;
    }
616320
protected void putToCache(String cacheName, String key, Object value) {
        putToCache(cacheName, key, value, 0);
    }
817435
public V put(K key, V value)
  {
    Entry<V> oldValue = _cache.put(key, new Entry<V>(_expireInterval, value));

    if (oldValue != null)
      return oldValue.getValue();
    else
      return null;
  }
1216238
function put(key, value) {
  const entry = { key, value };
  // Note: No protection agains replacing, and thus orphan entries. By design.
  this._keymap[key] = entry;
  if (this.tail) {
    // link previous tail to the new tail (entry)
    this.tail.newer = entry;
    entry.older = this.tail;
  } else {
    // we're first in -- yay
    this.head = entry;
  }
  // add new entry to the end of the linked list -- it's now the freshest entry.
  this.tail = entry;
  if (this.size === this.limit) {
    // we hit the limit -- remove the head
    return this.shift();
  }
  // increase the size counter
  this.size += 1;
  return undefined;
}
243146
public Object put(Object key, Object value)
	{
		synchronized(this)
		{
				//253010, Do not check size since we do so in WebContainer
				Object obj = super.put(key, value);
				if (obj==null)		//Object was added or value previously added was null
					size = super.size(); 	
				return obj;				
		}
	}
897343
public void cache(Integer key, Object value) {
        synchronized (this) {
            Integer curkey = keys.get(value);
            // Already cached?
            if (curkey != null) return;
            cache.put(key, value);
            keys.put(value, key);
        }
    }
180457
public void put(K key, V value) {
        Set<V> set = storage.get(key);
        if (set == null) {
            set = new HashSet<>();
            storage.put(key, set);
        }
        set.add(value);
    }
287809
@SuppressWarnings("unchecked")
    public V put(final int key, final V value)
    {
        requireNonNull(value, "null values are not supported");

        V evictedValue = null;
        @DoNotSub final int setNumber = Hashing.hash(key, mask);
        @DoNotSub final int setBeginIndex = setNumber << setSizeShift;
        @DoNotSub int i = setBeginIndex;

        for (@DoNotSub int nextSetIndex = setBeginIndex + setSize; i < nextSetIndex; i++)
        {
            if (null == values[i])
            {
                break;
            }

            if (key == keys[i])
            {
                evictedValue = (V)values[i];
                shuffleUp(i, nextSetIndex - 1);

                break;
            }
        }

        if (null == evictedValue)
        {
            evictedValue = (V)values[setBeginIndex + (setSize - 1)];
        }

        shuffleDown(setBeginIndex);

        keys[setBeginIndex] = key;
        values[setBeginIndex] = value;

        cachePuts++;

        if (null != evictedValue)
        {
            evictionConsumer.accept(evictedValue);
        }
        else
        {
            ++size;
        }

        return null;
    }
105265
@Override
	public Object put(final Object key, final Object value) {
		lock.writeLock().lock();
		try {
			return properties.put(key, value);
		} finally {
			lock.writeLock().unlock();
		}
	}
1224757
@SuppressWarnings("unchecked")
    public V put(Integer key, V value) {

	int k = checkKey(key);
	int index = Arrays.binarySearch(keyIndices, k);

	if (index >= 0) {
	    V old = (V)(values[index]);
	    values[index] = value;
	    return old;
	}
	else {
	    int newIndex = 0 - (index + 1);	    
	    Object[] newValues = Arrays.copyOf(values, values.length + 1);
	    int[] newIndices = Arrays.copyOf(keyIndices, values.length + 1);

	    // shift the elements down to make room for the new value
	    for (int i = newIndex; i < values.length; ++i) {
		newValues[i+1] = values[i];
		newIndices[i+1] = keyIndices[i];
	    }

	    // insert the new value
	    newValues[newIndex] = value;
	    newIndices[newIndex] = k;

	    // switch the arrays with the lengthed versions
	    values = newValues;
	    keyIndices = newIndices;
	    
	    return null;
	}
    }
626007
private void putEntry(String key, CacheHeader entry) {
        if (!mEntries.containsKey(key)) {
            mTotalSize += entry.size;
        } else {
            CacheHeader oldEntry = mEntries.get(key);
            mTotalSize += (entry.size - oldEntry.size);
        }
        mEntries.put(key, entry);
    }