发布时间:2022-08-09 文章分类:编程知识 投稿人:李佳 字号: 默认 | | 超大 打印

Changes on 2.0 (2012-04-17)

Now implemented sharding feature. For use it, see this example config:

CACHES = {
    'default': {
        'BACKEND': 'redis_cache.cache.ShardedRedisCache',
        'LOCATION': [
            '127.0.0.1:6379:1',
            '127.0.0.1:6379:2',
            'unix:/path/to/socket:3',
        ],
        'OPTIONS': {
            'PARSER_CLASS': 'redis.connection.HiredisParser'
        }
    }
}