summaryrefslogtreecommitdiff
path: root/requests_cache/backends/base.py
Commit message (Collapse)AuthorAgeFilesLines
* Don't use bulk_delete() if only deleting a single keyJordan Cook2023-03-011-1/+8
|
* Set default serializers for each backend using param defaults instead of ↵Jordan Cook2023-01-131-28/+6
| | | | 'default_serializer' class attributes
* Make CachedResponse.cache_key available from all cache access methodsJordan Cook2022-12-301-3/+12
|
* Fix ambiguous log message for BaseCache.delete()Jordan Cook2022-12-301-1/+1
|
* Update type hints to appease Pylance and stricter mypy settingsJordan Cook2022-12-131-9/+17
|
* Make use of index with SQLiteCache.filter(expired=False)Jordan Cook2022-10-281-2/+5
|
* Handle errors due to invalid responses in deserialize(), so it applies to ↵Jordan Cook2022-10-281-8/+16
| | | | other methods besides just get_responses()
* Add more notes on deprecated methodsJordan Cook2022-10-261-1/+13
|
* Add BaseCache.has_key() back; this was intended to be deprecated, not yet ↵Jordan Cook2022-10-261-0/+7
| | | | removed
* Fix backwards-compatibility with deprecated remove_expired_responsesJordan Cook2022-10-261-2/+2
|
* Add 'url' argument to BaseCache.contains() and delete() for similarity to ↵Jordan Cook2022-09-301-3/+11
| | | | has_url() and delete_url()
* Silence DeprecationWarnings during tests for deprecated methodsJordan Cook2022-09-301-7/+10
|
* Add method to recreate cache keysJordan Cook2022-08-231-0/+12
|
* Add support for VaryJordan Cook2022-06-161-2/+4
|
* Clean up SerializerPipeline.decode_contentJordan Cook2022-06-111-1/+1
|
* Consolidate BaseCache convenience methods into contains(), filter(), and ↵Jordan Cook2022-06-111-146/+174
| | | | delete()
* Split up remove_expired_reponses() into remove() and reset_expiration() ↵Jordan Cook2022-06-111-61/+76
| | | | methods, with more granular arguments
* Add decode_content option for storage classes, and use as the default ↵Jordan Cook2022-06-101-9/+23
| | | | behavior for Filesystem, DynamoDB, and MongoDB backends
* Add 'older_than' argument to remove_expired_responses()Jordan Cook2022-05-031-13/+20
|
* Remove row count from BaseCache.__str__Jordan Cook2022-04-221-2/+2
|
* Add a BaseStorage.default_serializer attribute, to be more explicit about ↵Jordan Cook2022-04-221-4/+12
| | | | which backends use something other than pickle by default
* Merge *PickleDict storage classes into parent classesJordan Cook2022-04-221-3/+10
|
* Close database connections (if applicable) on CachedSession.__exit__ and close()Jordan Cook2022-04-181-0/+9
|
* Refactor utilities for parsing cache headers into CacheDirectives classJordan Cook2022-04-181-3/+2
|
* Move all cache policy-related modules to separate 'policy' subpackageJordan Cook2022-04-171-2/+2
|
* Move detailed backend docs from rst docstings to md filesJordan Cook2022-04-161-17/+17
|
* Add serializer name to cache key to avoid errors due to switching serializersJordan Cook2022-04-151-0/+2
|
* WIP: Add faster implementation of removing invalid redirects in SQLJordan Cook2022-04-101-7/+10
|
* Refactor refresh/revalidate behaviorJordan Cook2022-04-091-2/+4
| | | | | | | | | | | | | | | * 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/+5
| | | | for extra attributes set on requests.Response objects
* Move settings module to top level package, and leave 'models' subpackage for ↵Jordan Cook2022-04-011-1/+1
| | | | only serialized data models
* Add argument docs back to CachedSession.__init__ instead of generic ↵Jordan Cook2022-04-011-13/+14
| | | | **kwargs; init settings in CachedSession instead of BaseCache
* Split datetime-related utility functions into a separate moduleJordan Cook2022-03-291-1/+1
|
* Refactor session-level settings into separate CacheSettings classJordan Cook2022-03-291-31/+13
|
* Reword inaccurate usage of the term 'revalidate'Jordan Cook2022-03-111-6/+6
|
* Fix typo in docsJordan Cook2022-01-011-2/+2
|
* Add support for BaseCache keyword arguments passed along with a backend instanceJordan Cook2021-11-131-4/+16
|
* Move response content reset to DictStorage.__getitem__(), since that's the ↵Jordan Cook2021-10-231-2/+10
| | | | only place it's used
* Fix duplicate cache read (contains + getitem)Jordan Cook2021-10-231-5/+5
|
* Reorganize & improve request normalization functions:Jordan Cook2021-09-201-3/+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()`
* Redact ingored_parameters from CachedResponse.urlJordan Cook2021-09-151-1/+2
|
* Allow match_headers to optionally accept a list of specific headers to matchJordan Cook2021-09-061-2/+2
|
* Alias/rename 'include_get_headers' to 'match_headers' for clarity ↵Jordan Cook2021-09-061-3/+3
| | | | (backwards-compatibile)
* Allow has_url(), delete_url(), and create_key() to optionally take ↵Jordan Cook2021-08-281-13/+16
| | | | requests.Request arguments
* Reorganize user docs: break down User Guide and Advanced Usage sections into ↵Jordan Cook2021-08-261-2/+2
| | | | smaller pages
* Minor optimization: exclude redundant CachedResponse.cache_key and ↵Jordan Cook2021-08-251-1/+2
| | | | CachedHTTPResponse.headers from serialization, and set at runtime instead
* Add BaseCache.update() method as a shortcut for exporting to a different ↵Jordan Cook2021-08-251-53/+59
| | | | cache instance
* Add support for SQLite in-memory databasesJordan Cook2021-08-201-1/+8
|
* Better backend docsJordan Cook2021-08-201-11/+29
|
* Move autosummaries to module docstrings instead of template, to make them ↵Jordan Cook2021-08-201-0/+6
| | | | easier to customize