Skip to content

Commit 3a8cdc8

Browse files
author
codeba
committed
fix(redis-keeper-spring-boot-starter): Fixed the issue where idle redis connections were closed wrong.
1 parent 15d36e0 commit 3a8cdc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

redis-keeper-support/src/main/java/org/codeba/redis/keeper/support/CacheDatasource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public interface CacheDatasource<T> {
7676
* @return the map
7777
*/
7878
default Map<String, T> initialize(Map<String, CacheKeeperConfig> datasourceMap) {
79-
TEMPLATE_CONFIG_CACHE_SET.clear();
8079
final Map<String, T> map = new HashMap<>();
8180

8281
if (null == datasourceMap || datasourceMap.isEmpty()) {
@@ -118,7 +117,6 @@ default Map<String, T> initialize(Map<String, CacheKeeperConfig> datasourceMap)
118117
* @return the map
119118
*/
120119
default Map<String, List<T>> initializeMulti(Map<String, List<CacheKeeperConfig>> datasourceMap) {
121-
TEMPLATE_CONFIG_CACHE_SET.clear();
122120
final Map<String, List<T>> map = new HashMap<>();
123121

124122
if (null == datasourceMap || datasourceMap.isEmpty()) {
@@ -221,6 +219,8 @@ default void clean() {
221219
it.remove();
222220
}
223221
}
222+
223+
TEMPLATE_CONFIG_CACHE_SET.clear();
224224
}
225225

226226
}

0 commit comments

Comments
 (0)