summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2021-09-07 14:06:37 -0500
committerJordan Cook <jordan.cook@pioneer.com>2021-09-07 14:35:03 -0500
commit5779131b4cb62a3a513285f8fba0c675db07ae66 (patch)
treeb821a3ff8c1b805e8ec010bf9c02a58288321fce
parent310bab8047c714ee190b0eb8ac36838af1711308 (diff)
downloadrequests-cache-5779131b4cb62a3a513285f8fba0c675db07ae66.tar.gz
Update changelog and Readme linksv0.8.0
-rw-r--r--HISTORY.md2
-rw-r--r--README.md25
-rw-r--r--docs/index.md14
3 files changed, 22 insertions, 19 deletions
diff --git a/HISTORY.md b/HISTORY.md
index 969afbd..baec5b8 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,6 +1,6 @@
# History
-## 0.8.0 (2021-09-09)
+## 0.8.0 (2021-09-07)
[See all issues and PRs for 0.8](https://github.com/reclosedev/requests-cache/milestone/3?closed=1)
**Conditional requests & validation:**
diff --git a/README.md b/README.md
index d95a7e4..4c04af1 100644
--- a/README.md
+++ b/README.md
@@ -19,26 +19,26 @@ Complete project documentation can be found at [requests-cache.readthedocs.io](h
## Features
* 🍰 **Ease of use:** Keep using the `requests` library you're already familiar with. Add caching
- with a [drop-in replacement](https://requests-cache.readthedocs.io/en/stable/api.html#sessions)
+ with a [drop-in replacement](https://requests-cache.readthedocs.io/en/stable/user_guide/general.html#sessions)
for `requests.Session`, or
- [install globally](https://requests-cache.readthedocs.io/en/stable/user_guide.html#patching)
+ [install globally](https://requests-cache.readthedocs.io/en/stable/user_guide/general.html#patching)
to add caching to all `requests` functions.
* 🚀 **Performance:** Get sub-millisecond response times for cached responses. When they expire, you
still save time with
- [conditional requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Conditional_requests).
+ [conditional requests](https://requests-cache.readthedocs.io/en/stable/user_guide/headers.html#conditional-requests).
* 💾 **Persistence:** Works with several
- [storage backends](https://requests-cache.readthedocs.io/en/stable/user_guide.html#cache-backends)
+ [storage backends](https://requests-cache.readthedocs.io/en/stable/user_guide/backends.html)
including SQLite, Redis, MongoDB, and DynamoDB; or save responses as plain JSON files, YAML,
and more
* ⚙️ **Customization:** Works out of the box with zero config, but with a robust set of features for
configuring and extending the library to suit your needs
* 🕗 **Expiration:** Keep your cache fresh using
- [Cache-Control](https://requests-cache.readthedocs.io/en/stable/user_guide.html#cache-control),
+ [Cache-Control](https://requests-cache.readthedocs.io/en/stable/user_guide/headers.html#cache-control),
eagerly cache everything for long-term storage, use
- [URL patterns](https://requests-cache.readthedocs.io/en/stable/user_guide.html#url-patterns)
+ [URL patterns](https://requests-cache.readthedocs.io/en/stable/user_guide/expiration.html#expiration-with-url-patterns)
for selective caching, or any combination of strategies
* ✔️ **Compatibility:** Can be combined with other popular
- [libraries based on requests](https://requests-cache.readthedocs.io/en/stable/advanced_usage.html#library-compatibility)
+ [libraries based on requests](https://requests-cache.readthedocs.io/en/stable/user_guide/compatibility.html)
## Quickstart
First, install with pip:
@@ -46,7 +46,7 @@ First, install with pip:
pip install requests-cache
```
-Then, use [requests_cache.CachedSession](https://requests-cache.readthedocs.io/en/stable/api.html#sessions)
+Then, use [requests_cache.CachedSession](https://requests-cache.readthedocs.io/en/stable/session.html)
to make your requests. It behaves like a normal
[requests.Session](https://docs.python-requests.org/en/master/user/advanced/#session-objects),
but with caching behavior.
@@ -92,16 +92,17 @@ requests.get('http://httpbin.org/delay/1')
A quick example of some of the options available:
```python
+# fmt: off
from datetime import timedelta
from requests_cache import CachedSession
session = CachedSession(
'demo_cache',
- use_cache_dir=True # Save files in the default user cache dir
+ use_cache_dir=True, # Save files in the default user cache dir
cache_control=True, # Use Cache-Control headers for expiration, if available
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
+ 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
ignored_parameters=['api_key'], # Don't match this param or save it in the cache
match_headers=True, # Match all request headers
stale_if_error=True, # In case of request errors, use stale cache data if possible
@@ -114,7 +115,7 @@ To find out more about what you can do with requests-cache, see:
* [User Guide](https://requests-cache.readthedocs.io/en/stable/user_guide.html)
* [API Reference](https://requests-cache.readthedocs.io/en/stable/reference.html)
-* [Project Info](https://requests-cache.readthedocs.io/en/latest/project_info.html)
+* [Project Info](https://requests-cache.readthedocs.io/en/stable/project_info.html)
* A working example at Real Python:
[Caching External API Requests](https://realpython.com/blog/python/caching-external-api-requests)
* More examples in the
diff --git a/docs/index.md b/docs/index.md
index 7d0e4e5..08133ea 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,13 +1,15 @@
<!--
Pre-release warning to reduce confusion on what '/latest' means;
-TODO: remove prior to next minor release, or add script to make this conditional
+TODO: add script to make this conditional
+-->
+<!--
+ ```{admonition} Note
+ :class: warning
+ You are viewing the pre-release documentation, which may describe features that are still in development.
+ Documentation for the latest stable release can be found at [requests-cache.readthedocs.io](https://requests-cache.readthedocs.io)
+ ```
-->
-```{admonition} Note
-:class: warning
-You are viewing the pre-release documentation, which may describe features that are still in development.
-Documentation for the latest stable release can be found at [requests-cache.readthedocs.io](https://requests-cache.readthedocs.io)
-```
(index-page)=
<!-- Include Readme contents, except for the links to readthedocs, which would be redundant here -->