No, memcached is just a cache which means that your expensive to gather data can fall out of it for a large number of reasons, forcing you to gather it again. What you should do is store your gathered data in a local database, and then use memcache to cache lookups from that database. You can then fill your database both from your script and from live queries.
/Henrik On Tue, Dec 15, 2009 at 06:25, Dave L <[email protected]> wrote: > Hi, > I am writing an app using ruby on rails and am questioning if > memcached is an appropriate solution. I have a geography app that > allows a user to input anything related to geography like a city name, > river, or country. I parse different sources to return this > information such as wikipedia and this becomes very expensive. What I > would like to do is pre-cache everything. Right now, I am running a > rake task that takes a txt file that has every keyword possible, pings > wikipedia or wherever, then parses it, and then returns the data in an > array and caches it into memcached. > > Does memcached seem like a good solution? > > My other concern is that I am running this rake and loading the cache > on my local server with the hope of copying this cache to my server on > the cloud. Is this possible? > > Any help is appreciated. >
