public AmbryCacheEntry getObject(String key) {

    if (!cacheEnabled) { return null; }

    getRequestRate.mark();
    long getStartTime = System.currentTimeMillis();
    AmbryCacheEntry result = null;
    try {
      result = ambryCache.getIfPresent(key);
      logger.debug("[{}] Cache-{} for key {}", cacheId, result == null ? "miss" : "hit", key);
    } catch (Exception exc) {
      getErrorCount.inc();
      logger.error("[{}] Failed to get cache entry with key {} due to {}", cacheId, key, exc);
    } finally {
      getLatencyMs.update(System.currentTimeMillis() - getStartTime);
    }
    return result;
  }
Gets a value associated with a key
@param key Object for indexing the cache
@return Value associated with key, if present. Else, return null.
ambry-commons/src/main/java/com/github/ambry/commons/AmbryCache.java