Descriptiondecorators.Cache Attach an unique id to objects
decorators.Cache keeps track of the function argument by getting their
string representation. But it can happen that two objects have the same
string representation, if they are created in two different functions
(because they might be created in the same memory place).
So, this patch checks the first argument of the function, and if it's
possible to attribute to it an unique id, it does. Then, that unique id
will be used as part of the hash key. Then, if the cached function is
bound to two different objects, it will not consider those objects equal
anymore.
R=tonyg@chromium.org
BUG=
Patch Set 1 #
Total comments: 1
Messages
Total messages: 5 (0 generated)
|