How does it compare to MySQLs query cache?
Adding memcached support to your application can be a lot of work. MySQL has a handy query cache feature that will automatically cache the results of your SQL queries, making them way faster on repeat runs. How does memcached compare to this? MySQL’s query cache is centralized, so its benefits are seen by all servers connecting to it. • MySQL’s query cache flushes as soon as you modify a table. You can store a memcached item for a minimum amount of time, but if you get a lot of write traffic, MySQL’s query cache will be constantly expiring all entries • MySQL’s query cache has scalability issues for many CPUs. It adds a global lock, and gets slower as it has to flush more queries. • You can’t store arbitrary data objects into the cache. You can build much more efficient caches with memcached. Run several separate queries to build a user object, build the user object, then cache that. MySQL’s query cache can help small sites, but can do more harm than good at scale. • Memory is limited