Dalli – memcached for Ruby

2010-08-30 memcached

Dalli is my brand new memcached client for Ruby. I’ve maintained Ruby’s memcache-client for two years now and been dissatisfied with the codebase for a while.

Coincidentally, NorthScale approached me recently about building a pure Ruby memcached client which used the new binary protocol defined in memcached 1.4. We worked out an arrangement to sponsor the OSS project which became Dalli.

My goals for Dalli were threefold:

  1. Clean sheet codebase using the binary protocol
  2. Drop-in replacement for memcache-client in Rails for a very simple upgrade path for Rails developers
  3. Equivalent or faster performance than memcache-client

I’m happy to say that Dalli meets all those goals. For one, the Dalli core is almost half the size of the memcache-client core, 700 vs 1250 LOC! But wait, there’s more! Using Rails 3? Dalli drops right in! Using Heroku? Dalli works without any additional configuration! Take a look at the README for more details.

Please file an issue if you find a bug or have a feature you’d like to see. In the meantime, happy caching!