Static caching property

Joseph L. Casale jcasale at activenetwerx.com
Mon Mar 21 11:38:33 EDT 2016


With non static properties, you can use a decorator that overwrites the
method on the instance with an attribute containing the methods return
effectively caching it.

What technique for a static property can be used to accomplish what the
descriptor protocol does?

I need to cache the results of a method on a class across all instances.

Thanks,
jlc




More information about the Python-list mailing list