@cache.action(time_expire=300, cache_model=cache.ram, quick='SVP') it not use response.vars ? why?
why I cant store title in cache? def contacts(): response.title=T('some title') ... среда, 8 июля 2015 г., 17:54:19 UTC+3 пользователь Anthony написал: > > Caching an action in a controller only caches the value returned by the > action itself (i.e., the dictionary returned at the end of the function). > It does not cache the response object or any of its attributes, so > response.title, etc. will not be cached. If you want to cache the final > HTML response that is sent to the browser, then you must call > response.render() inside the action. This is explained here: > http://web2py.com/books/default/chapter/29/04/the-core#cache. > > Anthony > > On Wednesday, July 8, 2015 at 2:21:10 AM UTC-4, Dmitry Ermolaev wrote: >> >> exp_time = request.is_local and 3 or 360 >> @cache(request.env.path_info, time_expire=exp_time) >> >> not work properly - 1st call if good but all other calls is bad with >> response.any_my_vars is null >> > -- 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.