django-cache-with-mongodb


Namedjango-cache-with-mongodb JSON
Version 2024.10.31 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_time2024-11-05 10:05:15
maintainerOlivier Hoareau
docs_urlNone
authorOlivier Hoareau
requires_pythonNone
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": null,
    "maintainer_email": "olivier.p.hoareau@gmail.com",
    "keywords": "django, web, cache, mongodb",
    "author": "Olivier Hoareau",
    "author_email": "olivier.p.hoareau@gmail.com",
    "download_url": null,
    "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": "2024.10.31",
    "project_urls": {
        "Homepage": "https://github.com/Olivier-OH/django-cache-with-mongodb"
    },
    "split_keywords": [
        "django",
        " web",
        " cache",
        " mongodb"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b226a16c57dd1f6b2fc096d60ef9dc67aaf2853055e5e7599178efd5a81418af",
                "md5": "0f1d634f7e00f13e5766f7276ee3cd0b",
                "sha256": "d616d348031b229ab87d9b832df76ec99dd1ce821ea18252cfc00d7a1398b897"
            },
            "downloads": -1,
            "filename": "django_cache_with_mongodb-2024.10.31-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0f1d634f7e00f13e5766f7276ee3cd0b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7362,
            "upload_time": "2024-11-05T10:05:15",
            "upload_time_iso_8601": "2024-11-05T10:05:15.912124Z",
            "url": "https://files.pythonhosted.org/packages/b2/26/a16c57dd1f6b2fc096d60ef9dc67aaf2853055e5e7599178efd5a81418af/django_cache_with_mongodb-2024.10.31-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-05 10:05:15",
    "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.74019s