summaryrefslogtreecommitdiff
path: root/requests_cache/backends/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'requests_cache/backends/base.py')
-rw-r--r--requests_cache/backends/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/requests_cache/backends/base.py b/requests_cache/backends/base.py
index 3afe4e7..67f7832 100644
--- a/requests_cache/backends/base.py
+++ b/requests_cache/backends/base.py
@@ -185,7 +185,7 @@ class BaseCache:
invalid: bool = False,
older_than: ExpirationTime = None,
) -> Iterator[CachedResponse]:
- """Get responses from the cache, with optional filters
+ """Get responses from the cache, with optional filters for which responses to include:
Args:
valid: Include valid and unexpired responses; set to ``False`` to get **only**
@@ -298,9 +298,9 @@ class BaseCache:
'please use .delete(expired=True) instead',
DeprecationWarning,
)
- self.delete(expired=True, invalid=True)
if expire_after:
self.reset_expiration(expire_after)
+ self.delete(expired=True, invalid=True)
def values(self, check_expiry: bool = False) -> Iterator[CachedResponse]:
warn('BaseCache.values() is deprecated; please use .filter() instead', DeprecationWarning)