您的位置:首页 > 数据库 > Memcache

django redis VS memcache 区别简介

2016-04-29 14:27 183 查看
https://www.v2ex.com/t/142644
http://stackoverflow.com/questions/10558465/memcached-vs-redis
简单来说:

redis :支持的数据类型多,读写速度快,支持的单个文件大小要大,可以数据永久化

redis支持:

Binary-safe strings.

Lists: collections of string elements sorted according to the order of insertion. They are basically linked lists.

Sets: collections of unique, unsorted string elements.

Sorted sets, similar to Sets but where every string element is associated to a floating number value, called score. The elements are always taken sorted by their score, so unlike Sets it is possible to retrieve a range of elements (for example you may ask: give me the top 10, or the bottom 10).

Hashes, which are maps composed of fields associated with values. Both the field and the value are strings. This is very similar to Ruby or Python hashes.

Bit arrays (or simply bitmaps): it is possible, using special commands, to handle String values like an array of bits: you can set and clear individual bits, count all the bits set to 1, find the first set or unset bit, and so forth.

HyperLogLogs: this is a probabilistic data structure which is used in order to estimate the cardinality of a set. Don't be scared, it is simpler than it seems... See later in the HyperLogLog section of this tutorial.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: