You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Dimitri Unruh (JIRA)" <ji...@apache.org> on 2011/09/26 10:56:26 UTC

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

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

Dimitri Unruh updated OFBIZ-4341:
---------------------------------

    Attachment: OFBIZ-4341.patch

Hi Martin,

we also had the same problem with this issue. Our resolution looks very similar to your patch. The main difference is the getFromPrimaryKeyCache method.

Maybe you will have a look at this and tell me what you think.

Dimitri

> 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
>         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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira