Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-4341

GenericDelegator.findOne cache not working for not-found values (cached not-found treated like cache miss)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk
    • Trunk
    • framework
    • None

    Description

      GenericDelegator.findOne doesn't handle the cache consistently.

      When it doesn't find anything, it puts GenericValue.NULL_VALUE in the cache. When trying to read from the cache it uses the getFromPrimaryKeyCache method, which returns null when GenericValue.NULL_VALUE was stored in the cache, just like for cache misses. So a not-found value in the cache is treated like a cache miss and the cache isn't actually used.

      Attachments

        1. OFBIZ-4341.patch
          1.0 kB
          Dimitri Unruh
        2. OFBIZ-4341-findOne-cache-fix.patch
          1 kB
          Martin Kreidenweis

        Activity

          People

            jleroux Jacques Le Roux
            mkreidenweis Martin Kreidenweis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: