On Monday, September 18, 2017 at 10:09:51 AM UTC-4, Pierre wrote: > > I'd prefer the module option but I need to pass *time_expire* as a > variable (*db.atable.__variableName*), I don't think I can do that in a > module can I ? >
You are not limited to using the decorator to cache the results of a function. Instead, you can just do something like this: from mymodule import cache_this myrows = cache.redis('myrows', cache_this, time_expire=myvariable) Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.