Page 73 - Python Cơ Bản
P. 73

import redis




           r = redis.StrictRedis(...)

           r.set('foo', 'bar')

           pipe = r.pipeline()

           pipe.set('a', 1)

           pipe.set('b', 2)

           pipe.set('c', 3)

           pipe.get('foo')

           pipe.execute()






          7EY OLM KМM TLš˜RK XLиG  execute()  XLɳ WЌ XVϲ ZА 0MWX Xš˜RK

          иRK ZЪM GɨG OЎX UYϲ GжE XкRK PЖRL  :ɴ Hд OЎX UYϲ Xк чSϰR


          GSHI XVɱR






           [True, True, True, 'bar']
   68   69   70   71   72   73   74   75   76   77   78