summaryrefslogtreecommitdiff
path: root/HISTORY.md
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2022-04-08 18:38:46 -0500
committerJordan Cook <jordan.cook@pioneer.com>2022-04-09 16:12:05 -0500
commit5ff1e4dc240829b77e24fbf49091dc1c2d351401 (patch)
tree8cd075c195869cdecba84975fc80eb8719343899 /HISTORY.md
parent1828411bba841be3d0fa6d978952a14f2f8f2400 (diff)
downloadrequests-cache-5ff1e4dc240829b77e24fbf49091dc1c2d351401.tar.gz
Refactor refresh/revalidate behavior
* Rename two (unreleased) options to be more consistent with browser behavior: * `revalidate()` -> `refresh()` * `refresh()` -> `force_refresh()` * Revert `RequestSettings` changes and use just kwargs instead for per-request settings * Add full type hints back to extra kwargs for `CachedSession.send()` * Fix a bug in which some kwargs specific to requests-cache could get passed to `requests.Session.send()` * Use 'must-revalidate' as a temporary header for a user-requested refresh * Refer to expiration value of 0 more accurately as 'expire immediately' rather than 'do not cache' * It may potentially be saved and used with revalidation, depending on other headers/settings * `DO_NOT_CACHE` now has a different value but same effect * Refer to constants in docs instead of 0, -1, etc. * Log more details about post-read and pre-cache checks
Diffstat (limited to 'HISTORY.md')
-rw-r--r--HISTORY.md10
1 files changed, 6 insertions, 4 deletions
diff --git a/HISTORY.md b/HISTORY.md
index d2ad014..797aa78 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,15 +1,17 @@
# History
-## 0.10.0 (Unreleased)
-[See all issues and PRs for 0.10](https://github.com/reclosedev/requests-cache/milestone/5?closed=1)
+## Unreleased
+[See all unreleased issues and PRs](https://github.com/reclosedev/requests-cache/milestone/5?closed=1)
**Expiration & Headers:**
* Add support for `Cache-Control: only-if-cached`
* Revalidate for `Cache-Control: no-cache` request or response header
* Revalidate for `Cache-Control: max-age=0, must-revalidate` response headers
* Add `only_if_cached` option to `CachedSession.request()` and `send()` to return only cached results without sending real requests
-* Add `refresh` option to `CachedSession.request()` and `send()` to make (and cache) an new request regardless of existing cache contents
-* Add `revalidate` option to `CachedSession.request()` and `send()` to send conditional request (if possible) before using a cached response
+* Add `refresh` option to `CachedSession.request()` and `send()` to revalidate with the server before using a cached response
+* Add `force_refresh` option to `CachedSession.request()` and `send()` to awlays make and cache a new request regardless of existing cache contents
+* Make behavior for `expire_after=0` consistent with `Cache-Control: max-age=0`: if the response has a validator, save it to the cache but revalidate on use.
+* The constant `requests_cache.DO_NOT_CACHE` may be used to completely disable caching for a request
**Backends:**
* Add `wal` parameter for SQLite backend to enable write-ahead logging