Solr
  1. Solr
  2. SOLR-1893

common code in LRUCache and FastLRUCache should be refactored into SolrCacheBase

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      In SOLR-571 I created SolrCacheBase as a place to put some new code that i wanted to use in both LRUCache and FastLRUCache, but looking at those classes there is already quite a bit of cut/paste, and it would be nice to refactor anything that is duplicated up into the new parent class.

      1. SOLR-1893.patch
        15 kB
        Tomás Fernández Löbbe
      2. SOLR-1893.patch
        13 kB
        Hoss Man

        Activity

        Hide
        Tomás Fernández Löbbe added a comment -

        On the attached file I propose a possible refactor.

        Show
        Tomás Fernández Löbbe added a comment - On the attached file I propose a possible refactor.
        Hide
        Hoss Man added a comment -

        Updated tomas's patch to trunk with some tweaks

        Tomas: in general your patch looks good to me, but i did remove the "populateLst" method – even if it had a better name, i think that method just makes the subclasses harder to read, w/ really removing any duplication (yes they add the same keys, but the values come from differnet places)

        Show
        Hoss Man added a comment - Updated tomas's patch to trunk with some tweaks Tomas: in general your patch looks good to me, but i did remove the "populateLst" method – even if it had a better name, i think that method just makes the subclasses harder to read, w/ really removing any duplication (yes they add the same keys, but the values come from differnet places)
        Hide
        Hoss Man added a comment -

        Committed revision 1331622.

        Show
        Hoss Man added a comment - Committed revision 1331622.

          People

          • Assignee:
            Tomás Fernández Löbbe
            Reporter:
            Hoss Man
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development