msfroh commented on code in PR #14187:
URL: https://github.com/apache/lucene/pull/14187#discussion_r1992514802


##########
lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java:
##########
@@ -77,7 +77,8 @@
 public class IndexSearcher {
 
   static int maxClauseCount = 1024;
-  private static QueryCache DEFAULT_QUERY_CACHE;
+  // Caching is disabled by default.
+  private static QueryCache DEFAULT_QUERY_CACHE = null;
   private static QueryCachingPolicy DEFAULT_CACHING_POLICY = new 
UsageTrackingQueryCachingPolicy();

Review Comment:
   If the query cache is disabled by default, what do folks think about 
removing `DEFAULT_QUERY_CACHE`  altogether?
   
   I feel like anyone who would benefit from caching probably has some kind of 
SearcherManager singleton that can hand the cache instance to IndexSearchers as 
they're created. I don't think we need a mutable global variable for it.



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to