merge from trac:r13113
should use module name and class name for key of `@cached` decorator in Trac 0.12.x