When I add @cache as below in my default.py

@cache(request.env.path_info, 60, cache.ram)
def search_user_contacts(searchText):
    from applications.init.modules.user import User
    user = User(globals())
    contacts = user.find_contacts(searchText)
    return searchText, contacts

I get a runtime error: TypeError: <lambda>() takes no arguments (1
given)

In some way I'm failing to set-up this decorator to be smart enough to
call the function with the 'searchText' parameter.

Does anyone know where I've gone wrong?

Reply via email to