Skip to main content

A cache provider for CacheControl using UWSGI's caching framework.

Project description

cachecontrol-uwsgi

Build Status Coverage Status

Backend for CacheControl using uwsgi's caching framework.

Only works inside of uWSGI (the uwsgi module must be importable), and needs a configured cache (see uWSGI's --cache2 option) to work.

For an example uWSGI setup with a working cache, see test_app.py and its integration tests inside the repository. It's a test application that doesn't use CacheControl but has a configured cache that works.

Usage

import requests

from cachecontrol import CacheControl
from cachecontrol_uwsgi import UWSGICache

cached_session = CacheControl(requests.session(), cache=UWSGICache("cache_name"))

response = cached_session.get("http://httpbin.org/status/200")

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

cachecontrol-uwsgi-1.0.0.tar.gz (2.5 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