mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
user clearDefines optimize Oracle PrepareStatement Cache memoery use
This commit is contained in:
@@ -49,7 +49,7 @@ public class PreparedStatementPool {
|
||||
PreparedStatementHolder holder = map.get(key);
|
||||
|
||||
if (holder != null) {
|
||||
holder.incrementReusedCount();
|
||||
holder.incrementHitCount();
|
||||
dataSource.incrementCachedPreparedStatementHitCount();
|
||||
} else {
|
||||
dataSource.incrementCachedPreparedStatementMissCount();
|
||||
@@ -70,7 +70,7 @@ public class PreparedStatementPool {
|
||||
if (oldHolder != null) {
|
||||
dataSource.closePreapredStatement(oldHolder);
|
||||
} else {
|
||||
if (holder.getReusedCount() == 0) {
|
||||
if (holder.getHitCount() == 0) {
|
||||
dataSource.incrementCachedPreparedStatementCount();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user