From: Cameron Vessey Date: 2010-09-11T02:22:53+09:00 Subject: Re: Mechanize Cache problem Wait wait ... Got back into my code.. as far as I can tell every time I call for Mechanize to search the page it is doing it with a new instance of agent. So its probable not a caching problem. Because right now I don't even have the repeated search loop built .. I'm running it singularly ... and then running it again .. so the results are froma new agent instance every time ... hhhmmm.. Cuz I hit refresh in IE and a new entry is shown... I run my little search in Netbeans does show new entry.. repeat this for about 5 minutes eventual it shows new entry heres the code if your interesed ...but I'l go ask the Mechanize guys def search(search_url) results = [] agent = Mechanize.new page = agent.get(search_url) until page.links[0].text =~ /Next >>/ page.links.delete_at(0) end page.links.delete_at(0) while page.links[0].text =~ /^\d{1,}\z/ page.links.delete_at(0) end page.links.each{|l| results << l } return results end -- Posted via http://www.ruby-forum.com/.