Hi, I have a page that takes about 1 second to generate, when the amount of data is large. This page is cached. When new data is comming in and imported by a background process I want to rebuild the cached pages becouse, mean will the first hit comes to the pages is cached by rails I have 40 requests. So how will i best trigger and action on a controller from my background process (running with workling) Thanks Jon -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jon Stenqvist wrote:> I have a page that takes about 1 second to generate, when the amount of > data is large. This page is cached. When new data is comming in and > imported by a background process I want to rebuild the cached pages > becouse, mean will the first hit comes to the pages is cached by rails I > have 40 requests. > > So how will i best trigger and action on a controller from my background > process (running with workling)Just use Net:HTTP.get http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html#M001199 -- Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes, is''t that really the same as let the first user generate the page after I deleted the stalled cached page. My problem is that i have 40 users requesting the dynamic content before the first one is cached. At least the appears like that in the logfile, and my mongrel queue grows large during this time. Mark James wrote:> Jon Stenqvist wrote: > >> I have a page that takes about 1 second to generate, when the amount of >> data is large. This page is cached. When new data is comming in and >> imported by a background process I want to rebuild the cached pages >> becouse, mean will the first hit comes to the pages is cached by rails I >> have 40 requests. >> >> So how will i best trigger and action on a controller from my background >> process (running with workling) > > Just use Net:HTTP.get > > http://www.ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html#M001199 > > -- > Rails Wheels - Find Plugins, List & Sell Plugins - > http://railswheels.com-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---