PhE
unread,Jul 7, 2011, 7:08:21 AM7/7/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py-users
Hello,
I'm trying to use gluon.cache and @cache decorator in my web2py
application.
It works fine for decorating controller methods.
Now, I would like to use web2py cache in my modules :
@cache('fct1_key', time_expire=5, cache_model=cache.ram)
def my_function1(a, b, c):
#...
return 'something'
I look inside gluon/cache.py but the caching code seems to not allow
functions with arguments :-/
How to use argument with @cache decorator ?
How to make the cache aware of arguments values ?
It could be usefull to have web2py cache with a "pure function cache"
behaviour for the models/modules layer.