CacheControl
httplib2 caching for requests
Decision gist · record as of 2026-08-14
Yes. CacheControl is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It's a focused tool that solves a real problem and is widely used. Install it if your application makes repeated HTTP requests to cacheable resources.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with only 2 runtime dependencies.
- Actively maintained with recent commits and stable release history since 2013.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2025-11-14 (273 days) · last repo commit 2026-08-10 · 502 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 128,663,251 downloads/mo, #293 on PyPI
Alternatives
Verify before relying
import requests
from cachecontrol import CacheControl
sess = requests.session()
cached_sess = CacheControl(sess)
response = cached_sess.get('https://example.com')- Whether msgpack is required for all use cases or only for specific cache backends
- Performance impact of caching overhead relative to network savings in typical workloads
- Thread-safety guarantees compared to httplib2
What it is and what it does
CacheControl is a caching layer for the requests HTTP library that implements httplib2's caching algorithms. It wraps a requests session object and automatically caches responses based on standard HTTP caching headers, allowing you to avoid redundant network requests for cacheable resources.
The package solves the problem that requests lacks robust caching support. It depends on requests for HTTP functionality and msgpack for serialization, and works with modern Python versions. Caching is stored in a simple dictionary by default, making it straightforward to integrate into existing request-based workflows.
Use it for
- Reduce bandwidth and latency in applications that repeatedly fetch the same HTTP resources
- Speed up web scraping or API polling by respecting server cache directives
- Build client applications that serve cached responses when network is slow or unavailable
- Integrate HTTP caching into requests-based workflows without rewriting session logic
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
CacheControl is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It's a focused tool that solves a real problem and is widely used. Install it if your application makes repeated HTTP requests to cacheable resources.
Install
cachecontrol on PyPI
Before you install
Low install friction with only 2 runtime dependencies. Actively maintained with recent commits and stable release history since 2013.
Requires Python 3.10 or later.
License in practice
Apache-2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
import requests
from cachecontrol import CacheControl
sess = requests.session()
cached_sess = CacheControl(sess)
response = cached_sess.get('https://example.com')
Verify before relying
- Whether msgpack is required for all use cases or only for specific cache backends
- Performance impact of caching overhead relative to network savings in typical workloads
- Thread-safety guarantees compared to httplib2
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesrequestsmsgpack |
| Maintenance | Actively maintained 273 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 128,663,251 / month, #293 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: Web EnvironmentOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet :: WWW/HTTP |
Evidence: cachecontrol-0.14.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “http response caching”
- CacheControlCacheControl wraps requests sessions to automatically cache HTTP…
- httpxthrottlecacheWraps HTTPX with built-in rate limiting and caching transports,…
- acachecontrolAdds HTTP caching to aiohttp requests by respecting Cache-Control…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also acachecontrol · requests-cache · httplib2 · apeye · httpxthrottlecache · aiohttp-client-cache · fastapi-cache2 · diskcache-weave · requests-hardened · hishel