poorbarcode commented on code in PR #23052:
URL: https://github.com/apache/pulsar/pull/23052#discussion_r1684183874


##########
pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java:
##########
@@ -54,13 +49,17 @@ public class TopicName implements ServiceUnitId {
 
     private final int partitionIndex;
 
-    private static final LoadingCache<String, TopicName> cache = 
CacheBuilder.newBuilder().maximumSize(100000)
-            .expireAfterAccess(30, TimeUnit.MINUTES).build(new 
CacheLoader<String, TopicName>() {
-                @Override
-                public TopicName load(String name) throws Exception {
-                    return new TopicName(name);
-                }
-            });
+    private static final ConcurrentHashMap<String, TopicName> cache = new 
ConcurrentHashMap<>();

Review Comment:
   It is the same
   
   
[new_test.html.txt](https://github.com/user-attachments/files/16310771/new_test.html.txt)
   
   ```java
   private static final LoadingCache<String, TopicName> cache =
   Caffeine.newBuilder().maximumSize(100_000).build(new CacheLoader<String, 
TopicName>() {
       @Override
       public TopicName load(String key) throws Exception {
           return new TopicName(key);
       }
   });
   ```
   
   
![WechatIMG164_](https://github.com/user-attachments/assets/ae580645-a20a-42f0-8d4a-a08995c16252)
   



-- 
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]

Reply via email to