[jira] [Closed] (OFBIZ-4341) GenericDelegator.findOne cache not working for not-found values (cached not-found treated like cache miss)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Closed] (OFBIZ-4341) GenericDelegator.findOne cache not working for not-found values (cached not-found treated like cache miss)

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum closed OFBIZ-4341.
------------------------------

       Resolution: Fixed
    Fix Version/s: SVN trunk

Fixed in rev 1527626.

> GenericDelegator.findOne cache not working for not-found values (cached not-found treated like cache miss)
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-4341
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4341
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Martin Kreidenweis
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-4341-findOne-cache-fix.patch, OFBIZ-4341.patch
>
>
> {{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.



--
This message was sent by Atlassian JIRA
(v6.1#6144)