Skip to content

Commit

Permalink
statement cache eviction invalidation base on time
Browse files Browse the repository at this point in the history
  • Loading branch information
mrzhao authored and nichunen committed Feb 4, 2020
1 parent 0b2b94e commit 6e7c33d
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ private GenericKeyedObjectPool<PreparedContextKey, PreparedContext> createPrepar
config.setMaxTotal(kylinConfig.getQueryMaxCacheStatementNum());
config.setBlockWhenExhausted(false);
config.setMinEvictableIdleTimeMillis(10 * 60 * 1000L); // cached statement will be evict if idle for 10 minutes
config.setTimeBetweenEvictionRunsMillis(60 * 1000L);
GenericKeyedObjectPool<PreparedContextKey, PreparedContext> pool = new GenericKeyedObjectPool<>(factory,
config);
return pool;
Expand Down

0 comments on commit 6e7c33d

Please sign in to comment.