summaryrefslogtreecommitdiff
path: root/requests_cache/cache_control.py
Commit message (Collapse)AuthorAgeFilesLines
* Move all cache policy-related modules to separate 'policy' subpackageJordan Cook2022-04-171-299/+0
|
* Log cache criteria checks for both read and writeJordan Cook2022-04-091-20/+26
|
* Also skip cache read for requests excluded by allowable_methodsJordan Cook2022-04-091-0/+1
|
* Move logic for translating kwargs to headers into ↵Jordan Cook2022-04-091-31/+35
| | | | cache_actions.set_request_headers()
* Refactor refresh/revalidate behaviorJordan Cook2022-04-091-43/+62
| | | | | | | | | | | | | | | * 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
* Move request-specific settings into RequestSettings classJordan Cook2022-04-011-2/+2
|
* Move settings module to top level package, and leave 'models' subpackage for ↵Jordan Cook2022-04-011-1/+2
| | | | only serialized data models
* Add argument docs back to CachedSession.__init__ instead of generic ↵Jordan Cook2022-04-011-7/+8
| | | | **kwargs; init settings in CachedSession instead of BaseCache
* Update docs, doc dependencies, changelog, and contributorsJordan Cook2022-04-011-4/+5
| | | | | Also: Restrict redis-py to <4.2, which breaks parameter forwarding on python 3.7 and 3.8
* Fix 504 behavior with stale-if-error and only-if-cachedJordan Cook2022-04-011-1/+2
|
* More code cleanup and commentsJordan Cook2022-03-291-65/+74
|
* Fix some regression bugs and broken testsJordan Cook2022-03-291-6/+6
|
* Split datetime-related utility functions into a separate moduleJordan Cook2022-03-291-114/+16
|
* Refactor request-level settings into separate RequestSettings classJordan Cook2022-03-291-38/+34
|
* Refactor session-level settings into separate CacheSettings classJordan Cook2022-03-291-15/+32
|
* Move more cache policy logic to CacheActionsJordan Cook2022-03-291-0/+12
|
* Add support for Cache-Control: only-if-cached and corresponding options for ↵Jordan Cook2022-03-111-3/+22
| | | | request() and send()
* Add separate revalidate ('soft refresh') option, support revalidation for ↵Jordan Cook2022-03-111-24/+53
| | | | no-cache and must-revalidate, and related refactoring
* Add refresh option to CachedSession.request() and send()Jordan Cook2022-03-111-1/+13
|
* Fix disabling expiration for a single request with ↵Jordan Cook2022-02-151-6/+10
| | | | `CachedSession.request(..., expire_after=-1)`
* Move misc minor utils to a separate moduleJordan Cook2021-10-271-5/+2
|
* Add support for Cache-Control: immutableJordan Cook2021-10-231-4/+7
|
* Fix immediate expiration with Expires: 0 and reorganize cache header logic a bitJordan Cook2021-10-131-30/+24
|
* Support immediate expiration + revalidation for Cache-Control: max-age=0 and ↵Jordan Cook2021-10-101-2/+13
| | | | Expires: 0
* Fix behavior for cache_control=True with expire_afterJordan Cook2021-10-101-15/+30
|
* Define __all__ for a couple more modules for star importsJordan Cook2021-09-201-1/+1
|
* Reorganize & improve request normalization functions:Jordan Cook2021-09-201-1/+2
| | | | | | | | | | | | * 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-0/+2
|
* Use only integers for expire_after values in seconds, since this is what ↵Jordan Cook2021-09-181-2/+3
| | | | Cache-Control: max-age requires
* Make per-request expiration thread-safe by passing via request headers ↵Jordan Cook2021-09-181-46/+25
| | | | instead of session attribute, and use Cache-Control request headers by default
* Enable conditional requests by defaultJordan Cook2021-08-261-6/+7
|
* Move autosummaries to module docstrings instead of template, to make them ↵Jordan Cook2021-08-201-1/+10
| | | | easier to customize
* Some misc docstring editsJordan Cook2021-08-191-1/+1
|
* Add support for Last-Modified + If-Modified-Since headersJordan Cook2021-08-141-19/+28
|
* Add support for ETag + If-None-Match headersJordan Cook2021-08-141-13/+14
|
* Convert CacheActions into an attrs classJordan Cook2021-08-141-16/+37
|
* Ensure httpdate strings from headers get converted to UTCJordan Cook2021-08-121-5/+4
|
* Add CachedResponse.cache_key attribute and update in CachedSession.send()Jordan Cook2021-07-201-2/+2
|
* Fix cache_control option to correctly toggle cache header usage (off by default)Jordan Cook2021-07-091-0/+9
|
* Improve type annotations and fix type checking errorsJordan Cook2021-07-061-5/+10
|
* Add support for using request and response cache headers to set cache expirationJordan Cook2021-05-071-0/+208