May 20th, 2007

memcaching rails by chris wanstrath

memcache is just a hash. no each or keys. just set, get and delete.

you can cache fragments, actions, sessions and objects.

gem install memcache-client

cache-fu is an api around memcache client.

you can use namespaces to share memcache across rails apps.

use ip’s for config. faster because you don’t have to resolve dns.

anytime you do migrations you have to increment the acts_as_cache :version

libketama – from the last.fm guys, allows you to throw memcache servers in and out and not invalidate your keys

Chris did an amazing job which is why I don’t really have much for notes. :)

Posted by jnunemaker in Plugins

1 Response to “Saturday: Memcaching Rails”

  1. From http://www.programmershaiku.com

    MemCache this MoFo I can serve Pages faster I make users smile

Thoughts? Do Tell...


(textile enabled)

About

Rails Tips is run by John Nunemaker, a web developer/programmer who has fallen deeply in love with Ruby.

Syndication

RailsTips Articles - An assortment of news and howto's related to ruby and rails.

Rails Quick Tips - These are cool Rails related links that I find. Typically, less than 5 a day.

Search