protected final Map<K, V> copyMap(Map<K, Expirable<V>> map) {
    ClassLoader classLoader = cacheManager.getClassLoader();
    return map.entrySet().stream().collect(toMap(
        entry -> copier.copy(entry.getKey(), classLoader),
        entry -> copier.copy(entry.getValue().get(), classLoader)));
  }
protected final Map < K , V > copyMap ( Map < K , Expirable < V > > map ) { ClassLoader classLoader = cacheManager . getClassLoader ( ) ; return map . entrySet ( ) . stream ( ) . collect ( toMap ( entry -> copier . copy ( entry . getKey ( ) , classLoader ) , entry -> copier . copy ( entry . getValue ( ) . get ( ) , classLoader ) ) ) ; }
Returns a deep copy of the map if value-based caching is enabled.

@param map the mapping of keys to expirable values
@return a deep or shallow copy of the mappings depending on the store by value setting