Hello all. I have an application with a search that gets users. When the user does a search it looks at the users location and and just gets random users from the database. It then pulls locations within X miles of the users location from the database and stores them in @locations. When the results are displayed the users location is just a random from @locations (@locations.sample.city).
My question: What would be the best way to cache the results. For example if the search returned User2's location at Nantucket then when the search is performed again User2 will still have Nantucket as it's location instead of another random location.
Thanks in advance.