Decorator to cache function return value.
- Parameters
-
func | Function being cached |
- Author
- James Robinson james.nosp@m..rob.nosp@m.inson.nosp@m.@cer.nosp@m.n.ch
Definition at line 6 of file cached.py.
7 """! Decorator to cache function return value.
9 @param func Function being cached
11 @author James Robinson <james.robinson@cern.ch>
20 return_value = func(*args)
21 cache[args] = return_value