diff --git a/hazelcast-jet-core/src/main/java/com/hazelcast/jet/impl/connector/HazelcastWriters.java b/hazelcast-jet-core/src/main/java/com/hazelcast/jet/impl/connector/HazelcastWriters.java
index <HASH>..<HASH> 100644
--- a/hazelcast-jet-core/src/main/java/com/hazelcast/jet/impl/connector/HazelcastWriters.java
+++ b/hazelcast-jet-core/src/main/java/com/hazelcast/jet/impl/connector/HazelcastWriters.java
@@ -80,15 +80,28 @@ public final class HazelcastWriters {
                 serializableConfig(clientConfig),
                 ArrayMap::new,
                 ArrayMap::add,
-                instance -> buffer -> {
-                    ICache cache = instance.getCacheManager().getCache(name);
-                    cache.putAll(buffer);
-                    buffer.clear();
-                },
+                CacheFlush.flushToCache(name),
                 noopConsumer()
         );
     }
 
+    /**
+     * This inner static class is necessary to conceal cache-api
+     * while serializing/deserializing other lambdas
+     */
+    private static class CacheFlush {
+
+        static Function<HazelcastInstance, Consumer<ArrayMap>> flushToCache(String name) {
+            return instance -> {
+                ICache cache = instance.getCacheManager().getCache(name);
+                return buffer -> {
+                    cache.putAll(buffer);
+                    buffer.clear();
+                };
+            };
+        }
+    }
+
     @Nonnull
     public static ProcessorSupplier writeList(String name) {
         return writeList(name, null);
conceal cache-api with inner static class