summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2021-09-06 17:00:18 -0500
committerJordan Cook <jordan.cook@pioneer.com>2021-09-06 17:57:12 -0500
commit1dd8b699624753f6550fe93bdab2b93984e688d3 (patch)
tree163e47b7a60d33d545a545501c4297673f3f4347 /README.md
parente36e851716c35877fc373440a8f0c96669aeb082 (diff)
downloadrequests-cache-1dd8b699624753f6550fe93bdab2b93984e688d3.tar.gz
Alias/rename old_data_on_error to stale_if_error for consistency with Cache-Control: stale-if-error (backwards-compatibile)
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 3f8c5ff..d95a7e4 100644
--- a/README.md
+++ b/README.md
@@ -102,9 +102,9 @@ session = CachedSession(
expire_after=timedelta(days=1), # Otherwise expire responses after one day
allowable_methods=['GET', 'POST'] # Cache POST requests to avoid sending the same data twice
allowable_codes=[200, 400] # Cache 400 responses as a solemn reminder of your failures
- match_headers=True, # Match all request headers
ignored_parameters=['api_key'], # Don't match this param or save it in the cache
- old_data_on_error=True, # In case of request errors, use stale cache data if possible
+ match_headers=True, # Match all request headers
+ stale_if_error=True, # In case of request errors, use stale cache data if possible
)
```