• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Like this presentation? Why not share!

Pylibmc

on

  • 989 views

Palestra rápida sobre a biblioteca pylibmc

Palestra rápida sobre a biblioteca pylibmc

Statistics

Views

Total Views
989
Views on SlideShare
988
Embed Views
1

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 1

https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Pylibmc Pylibmc Presentation Transcript

  • import pylibmc Rudá Moura
  • memcached libmemcached pylibmc
  • memcached -d -p 11211 -U 0 memcached -d -p 11212 -U 0 memcached -d -p 11213 -U 0
  • import pylibmc mc = pylibmc.Client([ '127.0.0.1:11211', '127.0.0.1:11212', '127.0.0.1:11213', ])
  • mc.set(‘foo’, 123) mc.set(‘bar’, [1,2,3]) mc.set(‘baz’, ‘bazinga!’)
  • print mc.get('foo') 123 print mc.get('bar') [1,2,3] print mc.get('baz') ‘bazinga!’
  • $ telnet localhost 11211 get foo VALUE foo 2 3 123 END get bar END get baz END
  • mc.behaviors mc.delete(‘bar’) mc.incr(‘foo’) / mc.decr(‘foo’) # atômico mc.setmulti({…}) mc.getmulti([…]) mc.deletemulti([…])