{ "info": { "author": "Christian Kreuzberger", "author_email": "ckreuzberger@anexia-it.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Framework :: Django :: 1.8", "Framework :: Django :: 2.0", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "====================\nDjango Request Cache\n====================\n\nDjango Request Cache provides a cache for each request (within your Django Request/Response cycle).\n\nQuick start\n-----------\n\n1. Download and install using `pip install`\n\n.. code-block:: bash\n\n pip install django-request-cache\n\n\n2. Add ``UserForeignKeyMiddleware`` and ``RequestCacheMiddleware`` to your ``MIDDLEWARE`` settings like this:\n\n.. code-block:: python\n\n MIDDLEWARE = (\n ...\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n ...\n 'django_userforeignkey.middleware.UserForeignKeyMiddleware',\n 'django_request_cache.middleware.RequestCacheMiddleware',\n )\n\n\nor if you are still using the an older Django version (e.g., Django 1.8) with ``MIDDLEWARE_CLASSES``:\n\n.. code-block:: python\n\n MIDDLEWARE_CLASSES = (\n ...\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n ...\n 'django_userforeignkey.middleware.UserForeignKeyMiddleware',\n 'django_request_cache.middleware.RequestCacheMiddleware',\n )\n\n\n3. Use the per-request cache as a decorator\n\n.. code-block:: python\n\n from django_request_cache import cache_for_request\n\n @cache_for_request\n def do_some_complex_calculation(a, b, c):\n print(\"Calculating... please wait\")\n return a * b * c\n\n\nTry it out by executing do_some_complex_calculation multiple times within your request\n\nAttribution\n-----------\n\n``RequestCache`` and ``RequestCacheMiddleware`` (see ``middleware.py``) are from a source code snippet on StackOverflow\nhttps://stackoverflow.com/questions/3151469/per-request-cache-in-django/37015573#37015573\ncreated by coredumperror https://stackoverflow.com/users/464318/coredumperror\nOriginal Question was posted by https://stackoverflow.com/users/7679/chase-seibert\nat https://stackoverflow.com/questions/3151469/per-request-cache-in-django\ncopied on 2017-Dec-20\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/anx-ckreuzberger/django-request-cache", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-request-cache", "package_url": "https://pypi.org/project/django-request-cache/", "platform": "", "project_url": "https://pypi.org/project/django-request-cache/", "project_urls": { "Homepage": "https://github.com/anx-ckreuzberger/django-request-cache" }, "release_url": "https://pypi.org/project/django-request-cache/1.1/", "requires_dist": null, "requires_python": "", "summary": "A simple Django app that provides a per-request cache.", "version": "1.1" }, "last_serial": 5599021, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "88984776aaf338f2bac8ec3101580b69", "sha256": "5d738b4dccc8f13b59aa854546815972f1164d0b02cf29f8e6cbb929a024349e" }, "downloads": -1, "filename": "django-request-cache-1.0.tar.gz", "has_sig": false, "md5_digest": "88984776aaf338f2bac8ec3101580b69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4031, "upload_time": "2017-12-20T14:19:27", "url": "https://files.pythonhosted.org/packages/60/f7/0ba45bd186ce7a1e028f9eb235d217c08a0faceb1201a1fe29103aa6a27b/django-request-cache-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "8d8ca5b9870840116c1b022b01245401", "sha256": "15f2209fe2db3b00ac23ebb585d7ea833bb4848882c62b4673ec7f95aea55a75" }, "downloads": -1, "filename": "django-request-cache-1.1.tar.gz", "has_sig": false, "md5_digest": "8d8ca5b9870840116c1b022b01245401", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4050, "upload_time": "2018-09-06T14:40:49", "url": "https://files.pythonhosted.org/packages/b7/34/d795c3d4e545123deb2143d8f3d4305ca9054f2e54fa082d96b4703a9cb0/django-request-cache-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8d8ca5b9870840116c1b022b01245401", "sha256": "15f2209fe2db3b00ac23ebb585d7ea833bb4848882c62b4673ec7f95aea55a75" }, "downloads": -1, "filename": "django-request-cache-1.1.tar.gz", "has_sig": false, "md5_digest": "8d8ca5b9870840116c1b022b01245401", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4050, "upload_time": "2018-09-06T14:40:49", "url": "https://files.pythonhosted.org/packages/b7/34/d795c3d4e545123deb2143d8f3d4305ca9054f2e54fa082d96b4703a9cb0/django-request-cache-1.1.tar.gz" } ] }