Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9886

Add ability to turn off/on caches

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4, 7.0
    • Component/s: None
    • Labels:
      None

      Description

      There is no elegant way to turn off caches (filterCache, queryResultCache etc) from the solrconfig. When I tried setting size and initialSize to zero, it resulted in caches of size 2. Here is the code that overrides setting zero sized cache.

      https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/search/FastLRUCache.java#L61-L73

      Only way to disable cache right now is by removing cache configs from the solrConfig, but we can simply provide an attribute to disable cache, so that we can override it using a system property.

        Attachments

        1. EnableDisableCacheAttribute.patch
          1 kB
          Pushkar Raste
        2. SOLR-9886.patch
          3 kB
          Noble Paul
        3. SOLR-9886.patch
          8 kB
          Pushkar Raste

          Activity

            People

            • Assignee:
              noble.paul Noble Paul
              Reporter:
              praste Pushkar Raste
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m