Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Merge pull request #3 from crimsonredmk/master

update README with settings and tips
latest commit 6c7484882d
Alireza Savand authored

README.rst

Django MongoDB Cash Backend

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.

Something went wrong with that request. Please try again.