Le mardi 13 septembre 2011 20:01:41, Olivier Dony a écrit :
On 09/13/2011 04:42 PM, Thibaut DIRLIK wrote:
I'm using the latest rev, just updated, same problem. I saw the commit
of Antonny Lesuisse about the fix, but it doesn't fix the part of the
code I talked about
Indeed, that's the last place where _get_ids.clear_cache() was being
called - Antony must have missed it too during the merge of the new cache.
Bit of context: the new cache implementation is faster and simpler, and
it supports the "multi" use case (@tools.ormcache_multi).
With the multi-valued version, the cache knows that one of the method
parameters is a list of keys, in which case the result is cached for
each key individually, allowing a cache hit next time any one of these
keys is requested.
However, contrary to the old cache implementation, this implementation
does not (yet) support the same multi-value behavior for the clearing of
the cache with cache_clear(), so the multiple keys need to be cleared
separately.
It should be fixed after revision 3588. Checked the rest of the code,
this was the last call to ormcache_multi.cache_clear() with a list of keys.
Thanks for spotting it! And since you asked: yes, this would of course
have been appreciated as a LP bug report, or a comment/reopen on bug
838864 :-)
Thanks for your answer and explanations. I asked here because I didn't
know how I exactly triggered it (using object with multiple _inherits
and a lot a complicated work). The bug would not have been confirmed
unless I could define a way to reproduce it, which I couldn't. But
reading the code I saw the problem. It's complicated to explain these
kinds of bugs :-)
Thanks for wasting time on this,
_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help : https://help.launchpad.net/ListHelp