public boolean putObject(String key, AmbryCacheEntry value) {

    if (!cacheEnabled) { return false; }

    putRequestRate.mark();
    long putStartTime = System.currentTimeMillis();
    boolean result = false;
    try {
      ambryCache.put(key, value);
      result = true;
      logger.debug("[{}] Inserted cache entry for key {}", cacheId, key);
    } catch (Exception exc) {
      putErrorCount.inc();
      logger.error("[{}] Failed to put cache entry with key {} due to {}", cacheId, key, exc);
    } finally {
      putLatencyMs.update(System.currentTimeMillis() - putStartTime);
    }
    return result;
  }
Puts a key-value pair in the cache
@param key Object for indexing the cache
@param value Payload associated with key
@return True if successful. Else false.
ambry-commons/src/main/java/com/github/ambry/commons/AmbryCache.java