code: private @Nullable CacheWriterException writeAllToCacheWriter(Map<? extends K, ? extends V> map) {
      if (!configuration.isWriteThrough() || map.isEmpty()) {
        return null;
      }
      List<Cache.Entry<? extends K, ? extends V>> entries = map.entrySet().stream()
          .map(entry -> new EntryProxy<>(entry.getKey(), entry.getValue()))
          .collect(toList());
      try {
        writer.writeAll(entries);
        return null;
      } catch (CacheWriterException e) {
        entries.forEach(entry -> {
          map.remove(entry.getKey());
        });
        throw e;
      } catch (RuntimeException e) {
        entries.forEach(entry -> {
          map.remove(entry.getKey());
        });
        return new CacheWriterException("Exception in CacheWriter", e);
      }
    }
docs: Writes all of the entries to the cache writer if write-through is enabled.