CHRIS WANSTRATH
   ERR FREE

   [ http://errfree.com ]
50,000,000 pages

 no downtime
memcached.
Memcaching Rails
  CHRIS WANSTRATH
     ERR FREE
     [ http://errfree.com ]
Memcaching Rails
  CHRIS WANSTRATH
     ERR FREE
     [ http://errfree.com ]
chris wanstrath
           railsconf 2007




 kickin’ ass
with cache-fu
{}
class Memcache < Hash
  undef :each, :keys
end
class Memcache < DRbHash
  undef :each, :keys
end
$ memcached -vv
<3 server listening
<7 new client connection
<7 get app-test:Story:1
>7 END
<7 set app-test:Story:2 0
>7 S...
$ memcached -vv
<3 server listening
<7 new client connection
<7 get app-test:Story:1
>7 END
<7 set app-test:Story:2 0
>7 S...
YAGNI
UYRDNI
UYRDNI
(unless you really do need it)
class Presentation < ActiveRecord::Base

      def self.get_cache(id)
          if data = @cache.get(id)
            data
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
Upcoming SlideShare
Loading in...5
×

Kickin' Ass with Cache-Fu (without notes)

9,692

Published on

My memcached talk at RailsConf 2007 (without notes). See the blog post: http://errtheblog.com/post/4872

Published in: Technology, Design
4 Comments
11 Likes
Statistics
Notes
  • Excellent. You've shown your credibility on presentation with this slideshow. This one deserves thumbs up. I'm John, owner of www.freeringtones.ws/ . Perhaps to see more quality slides from you.

    Best wishes.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • outstanding display..convinced me to have a hardlook at my company model..brilliant

    Janie
    http://financejedi.com
    http://healthjedi.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • cool stuff!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • There's also a version with notes: http://www.slideshare.net/err/kickin-ass-with-cachefu/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
9,692
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
242
Comments
4
Likes
11
Embeds 0
No embeds

No notes for slide

Kickin' Ass with Cache-Fu (without notes)

  1. 1. CHRIS WANSTRATH ERR FREE [ http://errfree.com ]
  2. 2. 50,000,000 pages no downtime
  3. 3. memcached.
  4. 4. Memcaching Rails CHRIS WANSTRATH ERR FREE [ http://errfree.com ]
  5. 5. Memcaching Rails CHRIS WANSTRATH ERR FREE [ http://errfree.com ]
  6. 6. chris wanstrath railsconf 2007 kickin’ ass with cache-fu
  7. 7. {}
  8. 8. class Memcache < Hash undef :each, :keys end
  9. 9. class Memcache < DRbHash undef :each, :keys end
  10. 10. $ memcached -vv <3 server listening <7 new client connection <7 get app-test:Story:1 >7 END <7 set app-test:Story:2 0 >7 STORED <7 delete app-test:Story:1 >7 DELETED
  11. 11. $ memcached -vv <3 server listening <7 new client connection <7 get app-test:Story:1 >7 END <7 set app-test:Story:2 0 >7 STORED <7 delete app-test:Story:1 >7 DELETED
  12. 12. YAGNI
  13. 13. UYRDNI
  14. 14. UYRDNI (unless you really do need it)
  15. 15. class Presentation < ActiveRecord::Base def self.get_cache(id) if data = @cache.get(id) data
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×