Skip to main content

Redis-cluster plugin for Django

Project description

dedis-cluster

redis-cluster plugin for django

基于redis-py-cluster,实现了使用redis集群作为django缓存的backend

安装

  • 源码安装
git clone https://github.com/feiwencaho/dedis-cluster.git
cd dedis-cluster
python setup.py install
  • pip安装
pip install dedis-cluster

使用

在settings.py中作如下配置

CACHES = {
    'default': {
        'BACKEND': 'dedis_cluster.cache.RedisClusterCache',
        # your redis-cluster nodes
        "LOCATION": [
            "redis://192.168.1.4:7000/0",
            "redis://192.168.1.4:7001/0",
            "redis://192.168.1.4:7002/0",
            "redis://192.168.1.4:7003/0",
        ],
        'OPTIONS': {
            "CLIENT_CLASS": "dedis_cluster.client.DefaultClient",
        }
    }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dedis-cluster-1.0.2.tar.gz (7.8 kB view hashes)

Uploaded Source

Built Distribution

dedis_cluster-1.0.2-py3-none-any.whl (13.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page