allthingssecurity commented on code in PR #28640:
URL: https://github.com/apache/camel/pull/28640#discussion_r4409800867
##########
components/camel-jcache/src/main/java/org/apache/camel/component/jcache/JCacheManager.java:
##########
@@ -37,13 +39,23 @@
import org.apache.camel.util.ObjectHelper;
public class JCacheManager<K, V> implements Closeable {
+ // The caching provider is a JVM singleton, and it returns the same cache
manager for the same uri, which returns
+ // the same cache for the same name: other managers (the other endpoints
of the cache, other caches, repositories,
+ // other CamelContexts) use them too, so each one is closed by the last
manager that uses it
+ private static final Map<Object, Integer> USERS = new HashMap<>();
Review Comment:
Added the class javadoc in 69df4da34482: every user must call `close()`, and
a manager that is never closed keeps the provider, cache manager and cache open
for the lifetime of the JVM.
_Claude Code on behalf of allthingssecurity_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]