summaryrefslogtreecommitdiff
path: root/requests_cache/session.py
Commit message (Collapse)AuthorAgeFilesLines
* Don't raise_for_status if status_code of response is in allowable_codesDavid Dv Schmidt2023-02-181-1/+4
|
* Update type hints to appease Pylance and stricter mypy settingsJordan Cook2022-12-131-7/+7
|
* Fix backwards-compatibility with deprecated remove_expired_responsesJordan Cook2022-10-261-3/+3
|
* Fix remove_expired_responses deprecation suggestionDave Gaeddert2022-10-261-1/+1
|
* Explicitly disable pickling CachedSession objectsJordan Cook2022-10-201-0/+6
|
* Update docsJordan Cook2022-06-161-11/+2
|
* Add support for VaryJordan Cook2022-06-161-1/+10
|
* Consolidate BaseCache convenience methods into contains(), filter(), and ↵Jordan Cook2022-06-111-5/+2
| | | | delete()
* Split up remove_expired_reponses() into remove() and reset_expiration() ↵Jordan Cook2022-06-111-9/+4
| | | | methods, with more granular arguments
* use https for links谭九鼎2022-05-091-1/+1
|
* Implement Cache-Control: stale-while-revalidateJordan Cook2022-05-041-4/+15
|
* Add 'older_than' argument to remove_expired_responses()Jordan Cook2022-05-031-3/+7
|
* Add always_revalidate session optionJordan Cook2022-05-031-0/+4
|
* Fix remove_expired_responses() with SQLite and expire_after=0Jordan Cook2022-04-301-2/+2
|
* Add a BaseStorage.default_serializer attribute, to be more explicit about ↵Jordan Cook2022-04-221-2/+2
| | | | which backends use something other than pickle by default
* Add support for Cache-Control: stale-if-errorJordan Cook2022-04-181-5/+5
|
* Add positional-or-keyword args to request wrapper methods consistent with ↵Jordan Cook2022-04-181-8/+8
| | | | requests API
* Close database connections (if applicable) on CachedSession.__exit__ and close()Jordan Cook2022-04-181-0/+5
|
* Refactor utilities for parsing cache headers into CacheDirectives classJordan Cook2022-04-181-4/+5
|
* Move all cache policy-related modules to separate 'policy' subpackageJordan Cook2022-04-171-4/+5
|
* Move detailed backend docs from rst docstings to md filesJordan Cook2022-04-161-15/+1
|
* Add default list of ignored_parameters for most common authentication ↵Jordan Cook2022-04-101-2/+4
| | | | params/headers
* Move logic for translating kwargs to headers into ↵Jordan Cook2022-04-091-32/+15
| | | | cache_actions.set_request_headers()
* Refactor refresh/revalidate behaviorJordan Cook2022-04-091-23/+38
| | | | | | | | | | | | | | | * Rename two (unreleased) options to be more consistent with browser behavior: * `revalidate()` -> `refresh()` * `refresh()` -> `force_refresh()` * Revert `RequestSettings` changes and use just kwargs instead for per-request settings * Add full type hints back to extra kwargs for `CachedSession.send()` * Fix a bug in which some kwargs specific to requests-cache could get passed to `requests.Session.send()` * Use 'must-revalidate' as a temporary header for a user-requested refresh * Refer to expiration value of 0 more accurately as 'expire immediately' rather than 'do not cache' * It may potentially be saved and used with revalidation, depending on other headers/settings * `DO_NOT_CACHE` now has a different value but same effect * Refer to constants in docs instead of 0, -1, etc. * Log more details about post-read and pre-cache checks
* Add an intermediate wrapper class, OriginalResponse, to provide type hints ↵Jordan Cook2022-04-011-3/+28
| | | | for extra attributes set on requests.Response objects
* Move request-specific settings into RequestSettings classJordan Cook2022-04-011-0/+1
|
* Move settings module to top level package, and leave 'models' subpackage for ↵Jordan Cook2022-04-011-5/+13
| | | | only serialized data models
* Add argument docs back to CachedSession.__init__ instead of generic ↵Jordan Cook2022-04-011-19/+61
| | | | **kwargs; init settings in CachedSession instead of BaseCache
* More code cleanup and commentsJordan Cook2022-03-291-28/+17
|
* Fix some regression bugs and broken testsJordan Cook2022-03-291-8/+6
|
* Split datetime-related utility functions into a separate moduleJordan Cook2022-03-291-7/+12
|
* Refactor request-level settings into separate RequestSettings classJordan Cook2022-03-291-82/+62
|
* Refactor session-level settings into separate CacheSettings classJordan Cook2022-03-291-75/+29
|
* Move more cache policy logic to CacheActionsJordan Cook2022-03-291-14/+3
|
* Add support for Cache-Control: only-if-cached and corresponding options for ↵Jordan Cook2022-03-111-4/+23
| | | | request() and send()
* Add separate revalidate ('soft refresh') option, support revalidation for ↵Jordan Cook2022-03-111-12/+20
| | | | no-cache and must-revalidate, and related refactoring
* Add refresh option to CachedSession.request() and send()Jordan Cook2022-03-111-6/+18
|
* Fix support for `params`, `data`, and `json` as positional arguments to ↵Jordan Cook2022-02-131-4/+4
| | | | `CachedSession.request()`
* Format using a more typical line length of 100Jordan Cook2022-01-011-3/+13
|
* Move 304 handling to separate methodJordan Cook2021-12-021-24/+25
|
* Update CachedResponse headers with 304 response headers (RFC7234)Manuel Eggimann2021-11-301-2/+8
|
* Update cache entry expiration date in case of 304 Not ModifiedManuel Eggimann2021-11-291-1/+6
|
* Add support for BaseCache keyword arguments passed along with a backend instanceJordan Cook2021-11-131-1/+0
|
* Move misc minor utils to a separate moduleJordan Cook2021-10-271-1/+1
|
* Fix behavior for cache_control=True with expire_afterJordan Cook2021-10-101-20/+9
|
* Update changelog and some docstringsJordan Cook2021-09-201-6/+12
|
* Reorganize & improve request normalization functions:Jordan Cook2021-09-201-4/+4
| | | | | | | | | | | | * Handle all normalization in `cache_keys` module, get rid of `normalize_dict()` function used in `CachedSession` * Reorganize `cache_keys` helper functions into the following: * `normalize_request()` * `normalize_url()` * `normalize_headers()` * `normalize_params()` * `normalize_body()` * `normalize_json_body()` * `redact_response()`
* Support expire_after param for CachedSession.send()Jordan Cook2021-09-181-2/+4
|
* Make per-request expiration thread-safe by passing via request headers ↵Jordan Cook2021-09-181-17/+11
| | | | instead of session attribute, and use Cache-Control request headers by default
* Fix incorrect debug message for skipping cache writeJordan Cook2021-09-151-1/+2
|