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.

Files for dedis-cluster, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size dedis_cluster-1.0.2-py3-none-any.whl (13.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size dedis-cluster-1.0.2.tar.gz (7.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page