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

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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • jcs-1.3
    • jcs-2.0-beta-2
    • Composite Cache
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment