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

The jcs.default.cacheattributes.MaxObjects does not work as expected.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: jcs-1.3
    • Fix Version/s: jcs-2.0-beta-2
    • Component/s: Composite Cache
    • Labels:
      None
    • Environment:
      Windows

      Description

      Using code based on JSCThrashTest ..
      jcs.default=
      jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
      jcs.default.cacheattributes.MaxObjects=10000
      jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache

      If I add 10,000 elements the getListSize() return 9,998 elements.
      If I change the MaxObjects to 10002 and add 15 K elements the getListSize() return 10,000 elements.

      Is there a good reason I need to add 2 to MaxObjects?
      I have scanned the cache and found there is actually 10000 elements when MaxObject is set to 10002

        Attachments

          Activity

            People

            • Assignee:
              tv Thomas Vandahl
              Reporter:
              peter_lawrey Peter Lawrey
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: