public boolean deleteObject(String key) {

    if (!cacheEnabled) { return false; }

    deleteRequestRate.mark();
    long deleteStartTime = System.currentTimeMillis();
    boolean result = false;
    try {
      ambryCache.invalidate(key);
      result = true;
      logger.debug("[{}] Deleted cache entry for key {}", cacheId, key);
    } catch (Exception exc) {
      deleteErrorCount.inc();
      logger.error("[{}] Failed to delete cache entry with key {} due to {}", cacheId, key, exc);
    } finally {
      deleteLatencyMs.update(System.currentTimeMillis() - deleteStartTime);
    }
    return result;
  }
Deletes a value associated with a key
@param key Object for indexing the cache
@return True, if delete succeeded. Else, false.
ambry-commons/src/main/java/com/github/ambry/commons/AmbryCache.java