History¶
0.14.3 (2026-01-07)¶
Fix compatibility with aiosqlite 0.22.1+
0.14.2 (2025-10-30)¶
Fixed
include_headersto apply toCachedSession.headersAdded support for python 3.14
Packaging and project config are now handled with uv. For users, installation still works the same. For developers, see Contributing Guide for details.
0.14.1 (2025-10-01)¶
Update type annotation for
CachedSession.__aenter__withSelftypeFix behavior of
CachedSession.disabled()when using multiple session instances
0.14.0 (2025-09-22)¶
Fixed a race condition in SQLite backend that could lead to
sqlite3.OperationalError: database is lockederrors.Fixed an issue where
CachedResponse.request_infocontained response headers instead of request headers.Removed a redundant Python 4 constraint so now our users do not need to write
<4in their “pyproject.toml” files.
0.13.0 (2025-04-08)¶
Fixed
CachedResponse.read()to be consistent withClientResponse.read()by allowing to callread()multiple times. (#289)Now a warning is raised when a cache backend is accessed after disconnecting (after exiting the
CachedSessioncontext manager). (#241)Fixed compatibility with
url-normalize2.0 (#326)Dropped Python 3.8 support due to the EOL.
0.12.4 (2024-10-30)¶
Fixed a bug that allowed users to use
save_response()andfrom_client_response()with an incorrectexpiresargument without throwing any warnings or errors.
0.12.3 (2024-10-04)¶
Revert some changes from
v0.12.0, and add alternative fix for compatibility with aiohttp 3.10.6+
0.12.2 (2024-10-02)¶
Fixed a regression in
v0.12.0when therequest_infoproperty was unavailable on a cached response. (!260)
0.12.1 (2024-10-02)¶
Fixed
get_encoding()access after unpickling. (#256)
0.12.0 (2024-10-01)¶
Add support for Python 3.13
Fix
CachedResponse.is_expiredcheck to consider any errors as “expired”. (!252)Fix compatibility with aiohttp 3.10.6+ (#251)
Now
CachedResponseinherits from theaiohttp.ClientResponse.
0.11.1 (2024-08-01)¶
Fix compatibility with aiosqlite 0.20
Add complete type hints for
CachedSession.get(),post(), etc. for compatibility with aiohttp 3.10Remove usage of
datetime.utcnow()(deprecated in python 3.12)
0.11.0 (2024-02-08)¶
Add support for Python 3.12.
Add a Docker Compose file with DragonflyDB service that can be used as a Redis drop-in replacement.
Add minor performance improvements for MongoDB backend. (!203)
Deprecations and Removals¶
Drop support for Python 3.7.
0.10.0 (2023-10-30)¶
Add support for conditional requests with
ETagandLast-ModifiedIf a DynamoDB item exceeds the max size (400KB), skip writing to the cache and log a warning instead of raising an error
Add
CachedResponse.closedattribute for compatibility withaiohttp.ClientResponseClose
aiosqlitethread if it’s still running when session object is deletedMove redirects cache for
FileBackendinto same directory as cached response filesFix issue in which
CachedSession.disabled()prevents only cache read but not write
0.9.1 (2023-09-20)¶
Remove unintended optional dependencies in both PyPI and conda-forge packages
0.9.0 (2023-09-19)¶
Add compatibility with Sentry python SDK
Add
autocloseoption toCacheBackendto close backend connections when the session context exits.Enabled by default for SQLite backend, and disabled by default for other backends.
python-forgeis no longer required and is now an optional dependencyFix reading response content multiple times for memory backend
0.8.2 (2023-07-14)¶
Add some missing type annotations to backend classes
Fix passing connection parameters to MongoDB backend
Revert closing backend connections on session context exit
Fix
CachedResponse.close()method to matchClientResponse.close()
0.8.1 (2023-01-05)¶
For SQLite backend, close database connection on
ClientSessioncontext exit
0.8.0 (2022-12-29)¶
Lazily initialize and reuse SQLite connection objects
Fix
AttributeErrorwhen using a response cached with an older version ofattrsFix concurrent usage of
SQLiteCache.bulk_commit()Add
fast_saveoption forSQLiteCache(PRAGMAsetting to improve write performance, with some tradeoffs)
0.7.3 (2022-07-31)¶
Remove upper version constraint for
attrsdependency
0.7.2 (2022-07-13)¶
Fix
TypeErrorbug when usingexpire_afterparam withCachedSession._request()
0.7.1 (2022-06-22)¶
Fix possible deadlock with
SQLiteCache.init_db()andclear()
0.7.0 (2022-05-21)¶
Support manually saving a response to the cache with
CachedSession.cache.save_response()Add compatibility with aioboto3 0.9+
Migrate to redis-py 4.2+ (merged with aioredis)
Add missing
aiosqlitedependency for filesystem backendAdd missing
CachedResponseproperties derived from headers:charsetcontent_lengthcontent_type
Add support for async filter functions
Move repo to requests-cache organization
0.6.1 (2022-02-13)¶
Migrate to aioredis 2.0
Fix issue with restoring empty session cookies
0.6.0 (2022-02-12)¶
Add a
bulk_delete()method for all backends to improve performance ofdelete_expired_responses()Update session cookies after fetching cached responses with cookies
Update session cookies after fetching cached responses with redirects with cookies
Add support for additional request parameter types that
aiohttpaccepts:Strings
(key, value)sequencesNon-
dictMappingobjects
Fix URL normalization for
MultiDictobjects with duplicate keysE.g., so
http://url.com?foo=bar&foo=bazis cached separately fromhttp://url.com?foo=bar
Update
ignored_paramsto also apply to headers (ifinclude_headers=True)
0.5.2 (2021-11-03)¶
Fix compatibility with aiohttp 3.8
0.5.1 (2021-09-10)¶
Fix issue with request params duplicated from request URL
0.5.0 (2021-09-01)¶
Add a filesystem backend
Add support for streaming requests
Add
RedisBackend.close()methodAdd
MongoDBPickleCache.values()method that deserializes itemsAllow
BaseCache.has_url()anddelete_url()to take all the same parameters ascreate_key()Improve normalization for variations of URLs & request parameters
Fix handling of request body when it has already been serialized
Fix bug enabling Cache-Control support by default
Add some missing no-op methods to
CachedResponsefor compatibility withClientResponse
0.4.3 (2021-07-27)¶
Fix bug in which response header
Expireswas used for cache expiration even withcache_control=FalseFix bug in which HTTP dates parsed from response headers weren’t converted to UTC
Add handling for invalid timestamps in
CachedResponse.is_expired
0.4.2 (2021-07-26)¶
Fix handling of
CachedResponse.encodingwhen the response body isNone
0.4.1 (2021-07-09)¶
Fix initialziation of
SQLiteBackendso it can be created outside main event loop
0.4.0 (2021-05-12)¶
Add optional support for the following request headers:
Cache-Control: max-ageCache-Control: no-cacheCache-Control: no-store
Add optional support for the following response headers:
Cache-Control: max-ageCache-Control: no-storeExpires
Add support for HTTP timestamps (RFC 5322) in
expire_afterparametersAdd a
use_tempoption toSQLiteBackendto use a tempfilePublished package on conda-forge
0.3.0 (2021-04-09)¶
Add async implementation of DynamoDb backend
Add support for expiration for individual requests
Add support for expiration based on URL patterns
Add support for serializing/deserializing
ClientSession.linksAdd case-insensitive response headers for compatibility with aiohttp.ClientResponse.headers
Add optional integration with
itsdangerousfor safer serializationAdd
CacheBackend.get_urls()to get all urls currently in the cacheAdd some default attributes (
from_cache, is_expired, etc.) to returned ClientResponse objectsAllow passing all backend-specific connection kwargs via CacheBackend
Add support for
jsonrequest bodyConvert all
keys()andvalues()methods into async generatorsFix serialization of Content-Disposition
Fix filtering ignored parameters for request body (
dataandjson)Add user guide, more examples, and other project docs
0.2.0 (2021-02-28)¶
Refactor SQLite backend to use
aiosqlitefor async cache operationsRefactor MongoDB backend to use
motorfor async cache operationsRefactor Redis backend to use
aiosqlitefor async cache operationsAdd integration tests and
docker-composefor local test servers
0.1.0 (2020-11-14)¶
Initial fork from
requests-cacheFirst pass at a general refactor and conversion from
requeststoaiohttpBasic features are functional, but some backends do not actually operate asynchronously