$ pip install redis python import redis redis_client = redis.Redis(host='localhost', port=6379, db=0) if redis_client.ping(): else: python redis_client.set('key', 'value') redis_client.setex('key', 3600, 'value') python value = redis_client.get('key') if value is not None: print(value) python redis_client.delete('key')


上一篇:
下一篇:
切换中文