Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-54

soft reference memory cache

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: jcs-1.3
    • Fix Version/s: jcs-2.0-beta-2
    • Component/s: None
    • Labels:
      None
    • Environment:
      mac, java 6

      Description

      I am caching some huge objects in a JCS disc cache. The objects are 3-15MB in serialized size and there are a lot of them. The normal setup with a LRUMemoryCache and a IndexedDiskCache works fine, but I would like to store as many objects in ram as possible without risking going out of ram. To get to this goal I have created a SoftReferenceMemoryCache that is based on a ConcurrentHashMap<Serializable, SoftReference<ICacheElement>>

      This task is to track the work and discuss this with others. Or perhaps get some feedback that this is not a good idea.

        Attachments

        1. SoftReferenceMemoryCache-try2.java
          9 kB
          Tore Halset
        2. SoftReferenceMemoryCache-try1.java
          7 kB
          Tore Halset

          Activity

            People

            • Assignee:
              tv Thomas Vandahl
              Reporter:
              halset Tore Halset
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: