django-cache-with-mongodb


Namedjango-cache-with-mongodb JSON
Version 2023.10.4 PyPI version JSON
download
home_pagehttps://github.com/Olivier-OH/django-cache-with-mongodb
SummaryProvides caching ability through MongoDB. Forked and detached from django_mongodb_cash_backend.
upload_time2023-10-06 08:27:00
maintainerOlivier Hoareau
docs_urlNone
authorOlivier Hoareau
requires_python
licenseBSD-3-Clause
keywords django web cache mongodb
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Django Cache With MongoDB

## Installation and Usage

Install with:

    $ pip install django-cache-with-mongodb

Add the following to your Django settings::

    CACHES = {
        'default': {
            'BACKEND': 'django_cache_with_mongodb.MongoDBCache',
            "LOCATION": "[mongodb://][username:password@]host1[:port1][,...hostN[:portN]][/[defaultdb][?options]]",
            "OPTIONS": {
                "USERNAME": "username_if_desired",
                "PASSWORD": "password_if_needed",
                "DATABASE": "cache_db_name",  # in not supplied in URI
                "COLLECTION": "cache_collection",  # default: django_cache
                # Any Connection Options supported by pymongo
            },
            "TIMEOUT": 86400, # either set TIMEOUT or MAX_ENTRIES, not both
            "MAX_ENTRIES": 10000, # either set MAX_ENTRIES or TIMEOUT, not both
        }
    }

### LOCATION

Location supports MongoDB [Connection String](https://www.mongodb.com/docs/manual/reference/connection-string/). Additionally, any supported pymongo parameters could be 

### OPTIONS

Any supported [pymongo parameters](https://pymongo.readthedocs.io/en/stable/api/pymongo/mongo_client.html) could be added to OPTIONS.

## Notice

The backend will handle TTL index creation if TIMEOUT is set, or will create a capped collection if MAX_ENTRIES is set. You should ensure that the collections are not created beforehands, so that the backend can do its work correctly.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Olivier-OH/django-cache-with-mongodb",
    "name": "django-cache-with-mongodb",
    "maintainer": "Olivier Hoareau",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "olivier.p.hoareau@gmail.com",
    "keywords": "django,web,cache,mongodb",
    "author": "Olivier Hoareau",
    "author_email": "olivier.p.hoareau@gmail.com",
    "download_url": "",
    "platform": "OS Independent",
    "description": "# Django Cache With MongoDB\n\n## Installation and Usage\n\nInstall with:\n\n    $ pip install django-cache-with-mongodb\n\nAdd the following to your Django settings::\n\n    CACHES = {\n        'default': {\n            'BACKEND': 'django_cache_with_mongodb.MongoDBCache',\n            \"LOCATION\": \"[mongodb://][username:password@]host1[:port1][,...hostN[:portN]][/[defaultdb][?options]]\",\n            \"OPTIONS\": {\n                \"USERNAME\": \"username_if_desired\",\n                \"PASSWORD\": \"password_if_needed\",\n                \"DATABASE\": \"cache_db_name\",  # in not supplied in URI\n                \"COLLECTION\": \"cache_collection\",  # default: django_cache\n                # Any Connection Options supported by pymongo\n            },\n            \"TIMEOUT\": 86400, # either set TIMEOUT or MAX_ENTRIES, not both\n            \"MAX_ENTRIES\": 10000, # either set MAX_ENTRIES or TIMEOUT, not both\n        }\n    }\n\n### LOCATION\n\nLocation supports MongoDB [Connection String](https://www.mongodb.com/docs/manual/reference/connection-string/). Additionally, any supported pymongo parameters could be \n\n### OPTIONS\n\nAny supported [pymongo parameters](https://pymongo.readthedocs.io/en/stable/api/pymongo/mongo_client.html) could be added to OPTIONS.\n\n## Notice\n\nThe backend will handle TTL index creation if TIMEOUT is set, or will create a capped collection if MAX_ENTRIES is set. You should ensure that the collections are not created beforehands, so that the backend can do its work correctly.\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Provides caching ability through MongoDB. Forked and detached from django_mongodb_cash_backend.",
    "version": "2023.10.4",
    "project_urls": {
        "Homepage": "https://github.com/Olivier-OH/django-cache-with-mongodb"
    },
    "split_keywords": [
        "django",
        "web",
        "cache",
        "mongodb"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f1c42a803be5d49311c2a69be711a9a559c2aa4b6630e87db4ee97146cd42ec5",
                "md5": "3e5071671614c9fefeda6f3c741506ac",
                "sha256": "a7d51a3a38210bbfbb25f780084d448e97ecfc5f6a208cb07dc07f45e329f625"
            },
            "downloads": -1,
            "filename": "django_cache_with_mongodb-2023.10.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3e5071671614c9fefeda6f3c741506ac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7259,
            "upload_time": "2023-10-06T08:27:00",
            "upload_time_iso_8601": "2023-10-06T08:27:00.885399Z",
            "url": "https://files.pythonhosted.org/packages/f1/c4/2a803be5d49311c2a69be711a9a559c2aa4b6630e87db4ee97146cd42ec5/django_cache_with_mongodb-2023.10.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-06 08:27:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Olivier-OH",
    "github_project": "django-cache-with-mongodb",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "django-cache-with-mongodb"
}
        
Elapsed time: 0.12407s