Skip to main content

Django cache backend stored in django request

Project description

Django cache backend stored in django request

https://travis-ci.org/mojeto/django-in-request-cache.svg?branch=master

Installation

$ pip install django-in-request-cache

Quick start

  1. Add “django-in-request-cache” to your setting as cache like this:

    from django.conf.global_settings import CACHES as DEFAULT_CACHES
    
    CACHES = dict(
        DEFAULT_CACHES,
        cache_in_request={
            'BACKEND': 'django_in_request_cache.cache.InRequestCache',
            # 'LOCATION': 'my_request_cache',  # request property name to store data
            # 'OPTIONS': {},
        },
    )
  2. Add django-globals middleware to your settings like this:

    MIDDLEWARE_CLASSES = [
        ...,
        'django_globals.middleware.Global',
    ]

License

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-in-request-cache-0.0.4.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