"A question I'll often hear is, "How do I dump the data back out of Memcached?" If you're asking that question it usually means you're not thinking about Memcached correctly."
"A question I'll often hear is, "How do I dump the data back out of Memcached?" If you're asking that question it usually means you're not thinking about Memcached correctly."
Find places where a result set or computed value takes 500 milliseconds to get out of the database (or to compute in your expensive Apache worker that could be setting up for a new request instead). Wrap the calls that get these values in a caching layer that first polls memcached to see if the result is there, gets the data from the database if it isn't, and then stores it in memcached before returning it. There are plenty of libraries that will just about automate this for you -- you call the fetcher function with the cache key and a callback to use in the event it isn't there, and it does the right thing.