Package horizons :: Package util :: Package python :: Module decorators
[hide private]
[frames] | no frames]

Module decorators

source code

Save general python function decorators here

Classes [hide private]
  cachedfunction
Decorator that caches a function's return value each time it is called.
  cachedmethod
Same as cachedfunction, but works also for methods.
Functions [hide private]
 
temporary_cachedmethod(timeout)
Same as cachedproperty, but cached values only remain valid for a certain duration
source code
 
cachedproperty(f)
returns a cached property that is calculated by function f
source code
Variables [hide private]
  __package__ = 'horizons.util.python'
Function Details [hide private]

temporary_cachedmethod(timeout)

source code 

Same as cachedproperty, but cached values only remain valid for a certain duration

Parameters:
  • timeout - number of seconds to cache the value for