diff options
author | Jordan Cook <jordan.cook@pioneer.com> | 2021-08-10 11:37:58 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook@pioneer.com> | 2021-08-10 12:58:53 -0500 |
commit | a0e560adc17c541cf50b051222f0570414d59736 (patch) | |
tree | c0214fd57153d467fc80d735209539d44ba57db2 /docs/user_guide.md | |
parent | be8e9e9c8347b7707ecb16f7a6ff84f22070a4f6 (diff) | |
download | requests-cache-a0e560adc17c541cf50b051222f0570414d59736.tar.gz |
Add some more details to contributing guide, and add sample caches for 0.7 patch versions
Diffstat (limited to 'docs/user_guide.md')
-rw-r--r-- | docs/user_guide.md | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/user_guide.md b/docs/user_guide.md index ac42691..8b74f14 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -222,15 +222,15 @@ request, the following order of precedence is used: Examples: ```python -> >>> # To specify a unit of time other than seconds, use a timedelta -> >>> from datetime import timedelta -> >>> session = CachedSession(expire_after=timedelta(days=30)) -> -> >>> # Update an existing session to disable expiration (i.e., store indefinitely) -> >>> session.expire_after = -1 -> -> >>> # Disable caching by default, unless enabled by other settings -> >>> session = CachedSession(expire_after=0) +>>> # To specify a unit of time other than seconds, use a timedelta +>>> from datetime import timedelta +>>> session = CachedSession(expire_after=timedelta(days=30)) + +>>> # Update an existing session to disable expiration (i.e., store indefinitely) +>>> session.expire_after = -1 + +>>> # Disable caching by default, unless enabled by other settings +>>> session = CachedSession(expire_after=0) ``` ### URL Patterns |