merge from trac:r13113
should use module name and class name for key of `@cached` decorator in Trac 0.12.x
Merge branch 'v0.12-py25' into v0.12-py24