Source:
<code>public void putAll(final Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) { statusTransitioner.checkAvailable(); checkNonNull(entries); Function<Iterable<? extends Map.Entry<? extends K, ? extends V>>, Iterable<? extends Map.Entry<? extends K, ? extends V>>> remappingFunction = <START> memoize(new Function<Iterable<? extends Map.Entry<? extends K, ? extends V>>, Iterable<? extends Map.Entry<? extends K, ? extends V>>>() { <END> @Override public Iterable<? extends Map.Entry<? extends K, ? extends V>> apply(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) { if (cacheWriter != null) { Set<Map.Entry<? extends K, ? extends V>> toWrite = new HashSet<Map.Entry<? extends K, ? extends V>>(); Set<K> toRemove = new HashSet<K>(); for (Map.Entry<? extends K, ? extends V> entry: entries) { if (entry.getValue() == null) { toRemove.add(entry.getKey()); } else { toWrite.add(entry); } } try { if (!toWrite.isEmpty()) { cacheWriter.writeAll(toWrite); } if (!toRemove.isEmpty()) { cacheWriter.deleteAll(toRemove); } } catch (Exception e) { throw newCacheWriterException(e); } } return entries; } }); KeysIterable keys = new KeysIterable(entries); try { store.bulkCompute(keys, remappingFunction); } catch (CacheAccessException e) { try { remappingFunction.apply(entries); } finally { attemptRecovery(keys, e); } } catch (CacheWriterException e) { attemptRecovery(keys, e); throw e; } }</code><technical_language>issue here, of bulk methods memoized Function instances</technical_language>

Target:
public void putAll(final Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) { statusTransitioner.checkAvailable(); checkNonNull(entries); final Map<K, V> entriesToRemap = new HashMap<K, V>(); for (Map.Entry<? extends K, ? extends V> entry: entries) { entriesToRemap.put(entry.getKey(), entry.getValue()); } Function<Iterable<? extends Map.Entry<? extends K, ? extends V>>, Iterable<? extends Map.Entry<? extends K, ? extends V>>> remappingFunction = new Function<Iterable<? extends Map.Entry<? extends K, ? extends V>>, Iterable<? extends Map.Entry<? extends K, ? extends V>>>() { @Override public Iterable<? extends Map.Entry<? extends K, ? extends V>> apply(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) { for (Map.Entry<? extends K, ? extends V> entry: entries) { entriesToRemap.remove(entry.getKey()); } if (cacheWriter != null) { Set<Map.Entry<? extends K, ? extends V>> toWrite = new HashSet<Map.Entry<? extends K, ? extends V>>(); Set<K> toRemove = new HashSet<K>(); for (Map.Entry<? extends K, ? extends V> entry: entries) { if (entry.getValue() == null) { toRemove.add(entry.getKey()); } else { toWrite.add(entry); } } try { if (!toWrite.isEmpty()) { cacheWriter.writeAll(toWrite); } if (!toRemove.isEmpty()) { cacheWriter.deleteAll(toRemove); } } catch (Exception e) { throw newCacheWriterException(e); } } return entries; } }; KeysIterable keys = new KeysIterable(entries); try { store.bulkCompute(keys, remappingFunction); } catch (CacheAccessException e) { try { if (!entriesToRemap.isEmpty()) { remappingFunction.apply(entriesToRemap.entrySet()); } } finally { removeKeysWithStrategy(keys, e); } } catch (CacheWriterException e) { removeKeysWithStrategy(keys, e); throw e; } }