On Jan 25, 2:32 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> I should add that the original Django Proxy also did caching of the
> pages. The one I send you did not. Is this the functionality you need?
> It could be added easily adding
>
> if request.env.request_method=='GET':
>     proxy=cache(request.env.path_info,cache.disk,3600)(proxy)
>

I was confused by this technique at first.

The __call__ function of the Cache global class instance, cache, is
shown used as a decorator on page 113 of the web2py manual (2nd ed).

@cache cannot be used before def proxy since the use of a cache is
conditional on what the request method is (namely GET).

The above usage is just an alternative that modifiies the already
defined proxy function on a per request basis.

John Heenan

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@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