On Sun, Apr 5, 2009 at 5:33 AM, Adam Akhtar <rails-mailing-l...@andreas-s.net> wrote: > > Given a users search query my app goes off and scrapes a few sites and > provides the results to the user. The user can also choose to filter > these results even further by category, age etc and this will be updated > via ajax without refreshing. All result items are not static. Except for > its title the information for one item will change every 2 hours so > theres no point in caching the data to a database. > > Given that i want to allow filtering of the results how should i go > about storing the results after scraping? There will be at most about > 1000 results each comprising about 300chars. > > Can i just store them in a @@results variable? How do i overcome the > wiping of the data whilst in development mode? > > im new to rails but ive also read stuff on sessions, memcache etc but > not really sure if they are whats needed for this situtation? > > Can anyone help? > -- > Posted via http://www.ruby-forum.com/. > > > >
Why not write the results to a file. You could write the raw (pre-scraped) data to a file and re-scrape it or you could save the data structure in some format (YAML is an option here) Andrew Timberlake http://ramblingsonrails.com http://www.linkedin.com/in/andrewtimberlake "I have never let my schooling interfere with my education" - Mark Twain --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---