code: 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);
      }
docs: Puts the entry with the specified key into the cache.
  @param key The key to identify the entry by.
  @param entry The entry to cache.