incorrect caching in cache.check_memory_cache
A fix has been committed in http://bazaar.launchpad.net/~instant-core/instant/main/revision/288
Instant was inserting an object into the memory cache even though it was already found in the cache. It was inserting the object based on its address, and not its signature. This meant that a element or form declared in a loop would be repeatedly inserted into the memory cache, despite the signature being the same.
Add tags Tag help
Anders Logg (logg) wrote on 2010-02-14: #1
The above fix led to a unit test failing. This is now commented out in tests/test19.py. We need to figure out whether
- The bug fix is correct
and/or
- The unit test makes sense
Hide comment
Changed in instant:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Kent (kent-and)
Garth Wells (garth-wells) wrote on 2011-02-23: #2
Has this been fixed?
Hide comment
Martin Sandve Alnæs (martinal) wrote on 2012-01-20: #3
The disabled test checks (in an inconvenient way through timing) that .signature() is not called if the signature object (the object with a .signature() function) has already been placed in the memory cache. Since you've disabled placing signature objects in the memory cache, this fails. Since nobody has complained and ufl.Form.signature() caches the repr string itself anyway, this is probably ok. There are probably other places in instant with code designed to handle such object ids in the memory cache, but a cleanup here is a rather high risk operation and it probably doesn't hurt anyone.
Comments (3)
-
reporter -
Yes.
-
- changed status to resolved
- Log in to comment
Can this Issue be closed?