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.

Reply via email to