tkobayas commented on PR #6469:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6469#issuecomment-3350004666

   Btw,
   
   > I find the current caching approach even more concerning: this map could 
grow unbounded over time
   
   The map is limited to `MAX_SIZE_CACHE` with the insertion order (not LRU 
though). Am I missing something?
   
   ```
       private static final Map<String, Pattern> patternMap = 
Collections.synchronizedMap(new LinkedHashMap<>() {
           @Override
           protected boolean removeEldestEntry(Map.Entry<String, Pattern> 
eldest) {
               return size() > (MAX_SIZE_CACHE);
           }
       });
   ```


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to