From 275f675bc2fd6d5ffa3363a436867258a8eccd26 Mon Sep 17 00:00:00 2001 From: Jordan Cook Date: Fri, 10 Jun 2022 17:36:20 -0500 Subject: Split up remove_expired_reponses() into remove() and reset_expiration() methods, with more granular arguments --- HISTORY.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'HISTORY.md') diff --git a/HISTORY.md b/HISTORY.md index 454eb87..f10f94f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -55,6 +55,13 @@ * Always skip both cache read and write for requests excluded by `allowable_methods` (previously only skipped write) * Ignore and redact common authentication headers and request parameters by default. This provides some default recommended values for `ignored_parameters`, to avoid accidentally storing common credentials (e.g., OAuth tokens) in the cache. This will have no effect if you are already setting `ignored_parameters`. +**Other features:** +* Split existing features of `BaseCache.remove_expired_responses()` into multiple methods and arguments: + * Add `BaseCache.remove()` method with `expired` and `invalid` arguments + * Add `BaseCache.reset_expiration()` method to reset expiration for existing responses +* Add `older_than` argument to `BaseCache.remove()` to remove responses older than a given value +* Add `BaseCache.items()` method + **Type hints:** * Add `OriginalResponse` type, which adds type hints to `requests.Response` objects for extra attributes added by requests-cache: * `cache_key` @@ -69,6 +76,9 @@ **Dependencies:** * Replace `appdirs` with `platformdirs` +**Deprecations:** +* `BaseCache.remove_expired_responses()` and `CachedSession.remove_expired_responses()` are deprecated in favor of `BaseCache.remove()` + **Breaking changes:** Some relatively minor breaking changes have been made that are not expected to affect most users. -- cgit v1.2.1