Skip to main content

The only Django MongoDB Cache backend you need.

Project description

The only Django MongoDB Cache backend you need.

Installation and Usage

Install with:

pip install django-mongodb-cash-backend

Add the following to your Django settings:

CACHES = {
    'default': {
        'BACKEND': 'django_mongodb_cash_backend.MongoDBCache',
        "LOCATION": "DEFAULT",
        "TIMEOUT": 86400,
        "OPTIONS": {
            "HOST": "MongoDB_host",
            "PORT": 12345,
            "USERNAME": "username_if_desired",
            "PASSWORD": "password_if_needed"
        },
    }
}

Tips

On your MongoDB database, you should consider creating an index on the “expires” field. Culling old cache entries will be much faster and performance overall will be improved.

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

django-mongodb-cash-backend-2015.11.9.tar.gz (4.1 kB view hashes)

Uploaded Source

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