Re: [SQLObject] caching an expensive property
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Daniel M. B. <da...@ba...> - 2014-12-10 00:53:03
|
For recent Python versions (>2.7 I guess), you could have also written like:
with self.__cache_lock:
do_stuff
return self.__cache
The context protocol takes care of the rest.
Cheers,
Daniel
|