From 41369fc9ead34bbefe90a14766362a3387fe72f1 Mon Sep 17 00:00:00 2001 From: Ruslans Tarasovs Date: Mon, 28 Dec 2020 19:46:47 +0200 Subject: [PATCH] GH #131: Do not cache version twice --- .../evolutiongaming/kafka/flow/cassandra/CassandraModule.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/persistence-cassandra/src/main/scala/com/evolutiongaming/kafka/flow/cassandra/CassandraModule.scala b/persistence-cassandra/src/main/scala/com/evolutiongaming/kafka/flow/cassandra/CassandraModule.scala index e7e4b393..ec71e4c3 100644 --- a/persistence-cassandra/src/main/scala/com/evolutiongaming/kafka/flow/cassandra/CassandraModule.scala +++ b/persistence-cassandra/src/main/scala/com/evolutiongaming/kafka/flow/cassandra/CassandraModule.scala @@ -57,8 +57,7 @@ object CassandraModule { // `syncSession` is `keyspaceSession` if `autoCreate` was disabled, // no need to reconnect unsafeSession <- if (keyspace.autoCreate) keyspaceSession else Resource.liftF(syncSession.pure[F]) - plainSession <- SafeSession.of(unsafeSession) - _session <- plainSession.cachePrepared + _session <- SafeSession.of(unsafeSession) _healthCheck <- CassandraHealthCheckOf(unsafeSession, config) } yield new CassandraModule[F] { def session = _session