code: public synchronized Object update(String key, Object value) {
          // evict until size < maxSize
          while (isEvictionRequired() && entryLimit > 0 && entryLimit < Integer.MAX_VALUE) {
              evictStaleEntries();
          }
  
          CacheEntry oldEntry = null;
          CacheEntry curEntry = new CacheEntry(value);
          if (primaryTable.containsKey(key)) {
              oldEntry = (CacheEntry) primaryTable.put(key, curEntry);
          } else if (secondaryTable.containsKey(key)) {
              oldEntry = (CacheEntry) secondaryTable.put(key, curEntry);
          } else if (tertiaryTable.containsKey(key)) {
              oldEntry = (CacheEntry) tertiaryTable.put(key, curEntry);
          } else {
              oldEntry = (CacheEntry) primaryTable.put(key, curEntry);
          }
  
          return oldEntry != null ? oldEntry.value : null;
      }
docs: Update the value into the Cache using the specified key, but do not change
  the table level of the cache. If the key is not in any table, add it to
  the primaryTable
  
  @param key the key of the entry to be inserted
  @param value the value of the entry to be inserted
  @return the previous value associated with key, or null if there was none