summaryrefslogtreecommitdiff
path: root/requests_cache
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2021-08-28 14:43:32 -0500
committerJordan Cook <jordan.cook@pioneer.com>2021-08-28 14:55:54 -0500
commitff96fd72d38d0aeb0d369c3df99f73a511fa572a (patch)
treec4ce58417c39389cc430a0ee14d18df805b63444 /requests_cache
parent9331f787ed7ce025531f690823e1aac249e33db2 (diff)
downloadrequests-cache-ff96fd72d38d0aeb0d369c3df99f73a511fa572a.tar.gz
Add another Quickstart example to briefly introduce some options
Diffstat (limited to 'requests_cache')
-rw-r--r--requests_cache/session.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/requests_cache/session.py b/requests_cache/session.py
index 9590cad..5ebe4a0 100644
--- a/requests_cache/session.py
+++ b/requests_cache/session.py
@@ -290,14 +290,16 @@ class CachedSession(CacheMixin, OriginalSession):
Args:
cache_name: Cache prefix or namespace, depending on backend
- backend: Cache backend name, class, or instance; name may be one of
- ``['sqlite', 'mongodb', 'gridfs', 'redis', 'dynamodb', 'memory']``.
+ backend: Cache backend name, or instance; name may be one of
+ ``['sqlite', 'mongodb', 'gridfs', 'redis', 'dynamodb', 'memory']``
+ serializer: Serializer name or instance; name may be one of
+ ``['pickle', 'json', 'yaml', 'bson']``.
expire_after: Time after which cached items will expire
urls_expire_after: Expiration times to apply for different URL patterns
allowable_codes: Only cache responses with one of these status codes
allowable_methods: Cache only responses for one of these HTTP methods
- include_get_headers: Make request headers part of the cache key
- ignored_parameters: List of request parameters to be excluded from the cache key
+ include_get_headers: Match request headers when reading from the cache
+ ignored_parameters: List of request parameters to exclude from the cache and not match
filter_fn: Function that takes a :py:class:`~requests.Response` object and returns a boolean
indicating whether or not that response should be cached. Will be applied to both new
and previously cached responses.