Memcache

Making applications scale with caching

David Rasch

david@davidrasch.com

May 2007 TriPUG and MySQL Meeting sponsored by Capital TechSearch

What's Memcache?

Architecture

Setup - Client

Easy using Ubuntu Feisty 07.04
# aptitude install php5-memcache
# /etc/init.d/apache2 restart

Setup - Server

Also easy using Ubuntu Feisty 07.04
# aptitude install memcached

In action: Let's make a 'blog'

Peforms Great!

MySQL Query cache!

What if we track how many times each post was viewed?

(see 2-uncached/ and 3-refactored/) Now it's slow :-(
Let's make it cache! (see 4-cached/ directory)

Resources

Included code

Included code