Skip to content

Commit 5e678a7

Browse files
committed
Andrew's comment
1 parent 54050e3 commit 5e678a7

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlPrepareAsyncProcessor.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,14 @@ public CqlPrepareAsyncProcessor() {
6363
}
6464

6565
public CqlPrepareAsyncProcessor(@NonNull Optional<? extends DefaultDriverContext> context) {
66+
// Use weakValues to evict prepared statements from the cache as soon are they are
67+
// no longer referenced elsewhere.
6668
this(context, CacheBuilder::weakValues);
6769
}
6870

6971
protected CqlPrepareAsyncProcessor(
7072
Optional<? extends DefaultDriverContext> context,
7173
Function<CacheBuilder<Object, Object>, CacheBuilder<Object, Object>> decorator) {
72-
73-
// CASSJAVA-104
74-
// Note that the base cache does NOT use weak values like the one-arg constructor it previously
75-
// does!
7674
CacheBuilder<Object, Object> baseCache = CacheBuilder.newBuilder();
7775
this.cache = decorator.apply(baseCache).build();
7876
context.ifPresent(

0 commit comments

Comments
 (0)