Redis Cache System
Redis is one of the industry's leading key-value NoSQL databases. Similar to memcached, it supports storing more value types, including string (string), list (linked list), set (set), Zset (sorted set-ordered collection), and hash (hash type). These data types support Push/pop, Add/remove, and intersection-set and difference sets, and richer operations, and these operations are atomic. Based on this, Redis supports sorting in a variety of different ways. As with memcached, data is cached in memory to ensure efficiency. The difference is that Redis periodically writes the updated data to disk or writes the modified operation to the appended record file, and Master-slave (Master-Slave) synchronization is implemented on this basis.
Operating mode
1 ImportParamiko,redis2 3R=redis. Redis (host='127.0.0.1', port=6379)#Connect to Redis4R.set ('Foo','Bar')5 Print(R.get ('Foo'))6 forIteminchR.hscan_iter ('Info_1'):7 Print(Item,type (item))
View Code
More content, go directly to the detailed blog address
Http://www.cnblogs.com/alex3714/articles/6217453.html
Python 61st Day, 62nd Day Redis