Or in other word, @cache.ram(...) ALWAYS caches what the OUTPUT of a
controller action.

HOWEVER, if the output is a dict, then the web2py core will further
render them by the DEFAULT view. If the output is a string, then the
web2py core will serve it as-is. This is a rendering feature of web2py
core, and has nothing to do with cache feature.

Hope this explanation makes thing clear.

Regards,
Iceberg

On Oct10, 1:27am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> @cache.ram(...)
> def index(): return dict(a=3)
>
> caches the dict only
>
> @cache.ram(...)
> def index(): return response.render(a=3)
>
> caches the html
>
> On Oct 9, 11:00 am, Thadeus Burgess <thade...@thadeusb.com> wrote:
>
>
>
> > When you apply @cache to an controller action, what is actually cached, is
> > it just the response from the function, or the generated html? or the
> > returned dict() ?
>
> > Is there a way to have web2py just cache the generated html and serve it
> > like it was a static html file, depending on the request.env.path_info ?
>
> > -Thadeus
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to