From ff96fd72d38d0aeb0d369c3df99f73a511fa572a Mon Sep 17 00:00:00 2001 From: Jordan Cook Date: Sat, 28 Aug 2021 14:43:32 -0500 Subject: Add another Quickstart example to briefly introduce some options --- requests_cache/session.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'requests_cache/session.py') 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. -- cgit v1.2.1