Can I ask, what would be the best way to cache the feed action? I'm 
currently working on my own feed as well but I'm not experienced in 
implementing caching.

On Saturday, August 24, 2013 8:18:13 PM UTC+2, Alan Etkin wrote:
>
> > I'm trying to display a feed on my page that needs to update about every 
> 10 seconds without 
> > refreshing the entire page. I get the feed to display but not as it 
> should.
>
> I think you are trying to pause execution in a controller, which is not 
> the way of refreshing the client document. web2py has a timing feature for 
> this:
>
> 1) define the action that feeds the page component (in production you
> should have a <controller>/feed.load view file to render the content
>
> def feed():
>     whatever = ...
>     return whatever
>
> 2) in your page's layout add this:
>
> {{=LOAD(<controller>, "feed.load", ajax=True, timeout=10000, 
> times="infinity")}}
>
> It will load the output from the feed action and update the page content
>
>
> http://www.web2py.com/books/default/chapter/29/12/components-and-plugins#Components
>
> EDIT: Consider also using cache for the feed action or it will add a lot 
> of processing time/traffic to the webserver.
>
>

-- 

--- 
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/groups/opt_out.

Reply via email to