Skip to content

etene/cachecontrol-uwsgi

Repository files navigation

cachecontrol-uwsgi

PyPI Python versions 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")

About

Backend for CacheControl using uwsgi's caching framework

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages