擅长:python、mysql、java
<p>也许可以试试redis的set数据类型:</p>
<blockquote>
<p>Redis Sets are unordered collections of strings. The SADD command adds
new elements to a set. It's also possible to do a number of other
operations against sets like testing if a given element already
exists...</p>
</blockquote>
<p>从这里:<a href="http://redis.io/topics/data-types-intro" rel="nofollow">http://redis.io/topics/data-types-intro</a></p>
<p><a href="http://redis-py.readthedocs.org/en/latest/#redis.StrictRedis.sadd" rel="nofollow">redis-py</a>支持这些命令。在</p>