diff options
author | Jordan Cook <jordan.cook@pioneer.com> | 2021-08-06 20:53:11 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook@pioneer.com> | 2021-08-06 20:53:11 -0500 |
commit | 39559bc3c24224c53ad48edad457545e311be301 (patch) | |
tree | 27518ef2769c272b31d2b9215ae5e9f3b197e67e /docs/user_guide.md | |
parent | 37c9e3282e156064fa4ec6d09e93f7236f84a419 (diff) | |
download | requests-cache-39559bc3c24224c53ad48edad457545e311be301.tar.gz |
Remove some unnecessary escapes
Diffstat (limited to 'docs/user_guide.md')
-rw-r--r-- | docs/user_guide.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/user_guide.md b/docs/user_guide.md index dc37861..4698a9a 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -171,7 +171,7 @@ By default, all request parameters are taken into account when caching responses there may be request parameters that don't affect the response data, for example authentication tokens or credentials. If you want to ignore specific parameters, specify them with `ignored_parameters`: ```python ->>> session = CachedSession(ignored_parameters=\['auth-token'\]) +>>> session = CachedSession(ignored_parameters=['auth-token']) >>> # Only the first request will be sent >>> session.get('http://httpbin.org/get', params={'auth-token': '2F63E5DF4F44'}) >>> session.get('http://httpbin.org/get', params={'auth-token': 'D9FAEB3449D3'}) @@ -239,7 +239,7 @@ you're requesting. For example, you might request one resource that gets updated that changes infrequently, and another that never changes. Example: ```python >>> urls_expire_after = { -... '\*.site_1.com': 30, +... '*.site_1.com': 30, ... 'site_2.com/resource_1': 60 * 2, ... 'site_2.com/resource_2': 60 * 60 * 24, ... 'site_2.com/static': -1, @@ -250,9 +250,9 @@ that changes infrequently, and another that never changes. Example: You can also use this to define a cache whitelist, so only the patterns you define will be cached: ```python >>> urls_expire_after = { -... '\*.site_1.com': 30, +... '*.site_1.com': 30, ... 'site_2.com/static': -1, -... '\*': 0, # Every other non-matching URL: do not cache +... '*': 0, # Every other non-matching URL: do not cache ... } ``` |