code: public void clear() {
      mMap.forEach((key, value) -> {
        onCacheUpdate(key, value.mValue);
        onRemove(key);
      });
      mMap.clear();
    }
docs: Clears all entries from the map. This is not threadsafe, and requires external synchronization
  to prevent concurrent modifications to the cache.