diff --git a/VERSION b/VERSION index d0e265df..93cedd85 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-07-25 16:53:17) dev +Version 2.00.0 (2012-07-25 16:57:13) dev diff --git a/gluon/cache.py b/gluon/cache.py index 18b51714..437e140e 100644 --- a/gluon/cache.py +++ b/gluon/cache.py @@ -479,6 +479,13 @@ class Cache(object): return tmp def lazy_cache(key=None,time_expire=None,cache_model='ram'): + """ + can be used to cache any function including in modules, + as long as the cached function is only called within a web2py request + if a key is not provided, one is generated from the function name + the time_expire defaults to None (no cache expiration) + if cache_model is "ram" then the model is current.cache.ram, etc. + """ def decorator(f,key=key,time_expire=time_expire,cache_model=cache_model): key = key or repr(f) def g(*c,**d):