

Memcached: More Cache = Less Cash - safun
http://www.rackspacecloud.com/blog/2009/07/29/memcached-more-cache-less-cash/

======
brown9-2
Can someone who knows mysql well explain why the entire query cache for a
table is thrown out whenever an update/insert/delete is made to the table?

Sounds very "baby with the bathwater"-ish.

The author of the article kind of makes it sound like this issue with mysql is
the primary reason to use memcached. I'm sure not every RDBMS has the same
issue (and I'm sure there are lots of other reasons to use memcached).

~~~
eli
Cache invalidation is a deceptively difficult problem.

The direct answer is because it's pretty difficult to figure out how an
insert/update/delete is going to affect all the various queries stored in the
cache... without running them all again. And of course you're not going to
rerun all the queries again on the off chance you might need them in the
future; you're just going to throw them out of the cache and regenerate them
the next time they're needed.

Note that this seems like an unfair comparison. I don't think many people
consider MySQL's transparent query cache a substitute for the (not
transparent) Memcache. Better would be memcache versus using a regular table
in a MySQL DB as a cache (many popular PHP CMSes do this).

------
leej
In the Facebook scale or similar scales if one relies only on OS instead of
extra cache layers what would be the numbers? With this pace we would be
talking about power efficient SRAM based caches in 10 years.

