id summary reporter owner description type status priority milestone component version severity resolution keywords cc branch changelog apichanges internalchanges 9870 Improve the cache subsystem Remy Blank Remy Blank "[comment:8:ticket:9866 #9866] got me thinking about the cache subsystem, and there are at least two issues that could be improved: * `CachedProperty` currently uses `instance.__class__` to determine the module and class names. This is not correct when a component is subclassed, as seems to be the case e.g. in Agilo. This means that a cached property defined in an abstract base component, and inherited by sub-components, will have a different id in every subclass, and hence invalidating in one subclass will not invalidate the cached value in the other subclasses. * Using a string identifier as a property id ''in the database'' was a pretty silly idea in retrospect. An integer hash of the identifier would be more space and time-efficient. Collisions are not an issue, as the only effect would be to invalidate slightly more than necessary. The first issue is a bug, so I would like to fix it in 0.12-stable. The solution for the first item is to use ''the class where the property is defined'' to determine the module and class names. The second is an enhancement that requires a DB upgrade, so I will implement it on trunk." enhancement closed high 1.0 general 0.12dev normal fixed cache Improved behavior and documentation for `@cached` properties. It is now safe to inherit from classes having `@cached` properties.