summaryrefslogtreecommitdiff
path: root/requests_cache/backends/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* Update type hints to appease Pylance and stricter mypy settingsJordan Cook2022-12-131-1/+3
|
* Merge *PickleDict storage classes into parent classesJordan Cook2022-04-221-13/+13
|
* Add support for DynamoDB TTLJordan Cook2022-04-201-2/+2
|
* Store responses in DynamoDB as JSON documents instead of serialized binariesJordan Cook2022-04-191-4/+4
|
* Move backend docs to user guide, separate from API reference docsJordan Cook2022-04-171-0/+2
|
* Remove some redundant, undocumented means of passing ↵Jordan Cook2022-04-011-7/+7
| | | | CachedSession/BaseBackend arguments
* More code cleanup and commentsJordan Cook2022-03-291-29/+9
|
* Refactor session-level settings into separate CacheSettings classJordan Cook2022-03-291-15/+14
|
* Add a new RedisDict class that stores responses in separate hashes instead ↵Jordan Cook2021-12-011-2/+2
| | | | of in a single hash
* Improve some RedisDict methods and rename to RedisHashDictJordan Cook2021-12-011-2/+2
|
* Add support for BaseCache keyword arguments passed along with a backend instanceJordan Cook2021-11-131-3/+15
|
* Move misc minor utils to a separate moduleJordan Cook2021-10-271-2/+1
|
* Add tests for memory (plain dict) backendJordan Cook2021-10-231-1/+1
|
* Add some alises so fully qualified imports of DbDict, etc. don't breakJordan Cook2021-09-141-1/+1
|
* Add note about 'cache_name' argument usage in init_backend()Jordan Cook2021-09-061-10/+10
|
* Alias/rename 'include_get_headers' to 'match_headers' for clarity ↵Jordan Cook2021-09-061-1/+1
| | | | (backwards-compatibile)
* Revert renaming DynamoDB backend classes; a minor inconsistency is probably ↵Jordan Cook2021-08-301-5/+3
| | | | better than an unnecessary API change
* Allow has_url(), delete_url(), and create_key() to optionally take ↵Jordan Cook2021-08-281-8/+1
| | | | requests.Request arguments
* Reorganize user docs: break down User Guide and Advanced Usage sections into ↵Jordan Cook2021-08-261-3/+1
| | | | smaller pages
* Make DynamoDB and MongoDB naming consistentJordan Cook2021-08-201-6/+8
|
* Move autosummaries to module docstrings instead of template, to make them ↵Jordan Cook2021-08-201-1/+3
| | | | easier to customize
* Rename DbDict to SQLiteDict for consistency with other backends (with ↵Jordan Cook2021-08-191-3/+7
| | | | aliases for backwards-compatibility)
* Some serialization fixes & updates:Jordan Cook2021-07-031-1/+0
| | | | | | | | | | | | | | | | | * Fix tests on python 3.6: * Make `cattrs` optional again * Don't run tests for serializers with missing optional dependencies * Show any skipped tests in pytest output * Fix redirect serialization for backends that serialize all values (DynamoDB and Redis) * Otherwise, the redirect value (which is just another key) will get converted into a `CachedResponse` * Make `pickle` serializer use `cattrs` if installed * Make `bson` serializer compatible with both `pymongo` version and standalone `bson` library * Split up `CattrStage` and preconf converters into separate modules * Turn preconf converters into `Stage` objects * Add `DeprecationWarning` for previous method of using `itsdangerous`, now that there's a better way to initialize it via `SerializerPipeline` * Remove `suppress_warnings` kwarg that's now unused * Make `SerializerPipeline`, `Stage`, and `CattrStage` importable from top-level package (`from requests_cache import ...`) * Add some more details to docs and docstrings
* Allow selecting a serializer by name, class, or instance (with same behavior ↵Jordan Cook2021-06-111-23/+10
| | | | as selecting backends)
* Add support for using request and response cache headers to set cache expirationJordan Cook2021-05-071-0/+2
|
* Add a filesystem backendJordan Cook2021-04-211-0/+5
|
* Allow passing any valid backend connection kwargs via BaseCacheJordan Cook2021-04-191-1/+9
| | | | | | | | * Pass `**kwargs` to backend storage classes, split out any that are valid for the backend-specific connection function/class, and pass them to the connection * Add intersphinx links to docs for dependencies * Update and format some more backend class docstrings * Remove 'Unrecognized keyword arguments' warning from `BaseStorage` * Turn `warnings.warn` about using secret keys into a `logging.warning` (due to complaints about too many messages)
* Update all backend-specific integration tests to fail quickly if not set up, ↵Jordan Cook2021-04-121-11/+11
| | | | rarther than silently ignoring or hanging
* Demote most logging.info statements to debugJordan Cook2021-04-101-1/+1
|
* Improve backend initialization:Jordan Cook2021-04-021-59/+65
| | | | | | | * Also allow passing a backend class (in addition to backend name and instance) * Detect duplicate params: Backends have different keyword args equivalent to the `cache_name` positional arg, for example `db_name`. If one of these is passed as a keyword arg, it results in a `TypeError` due to duplicate args (See #94). * For backends without dependencies installed, use a placeholder class to delay and re-raise the original `ImportError` * Add type annotations
* Move cache key utilities to a separate moduleJordan Cook2021-03-301-1/+2
|
* Add normalization for request jsonJordan Cook2021-03-301-1/+1
|
* Also remove invalid responses when running remove_expired_responses()Jordan Cook2021-03-301-0/+1
|
* Remove some redundant module docstrings, and fix some ref linksJordan Cook2021-03-291-6/+1
|
* Pass along optional kwargs to all storage classes, and make default table ↵Jordan Cook2021-03-241-2/+4
| | | | names consistent across backends (`'http_cache'`)
* Consolidate expiration, pre-serializiation, and other response object logic ↵Jordan Cook2021-03-221-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | into CachedResponse class: * Replace `_RawStore` with `CachedHTTPResponse` class to wrap raw responses * Maintain support for streaming requests (#68) * Improve handling for generator usage * Add support for use with `pandas.read_csv()` and similar readers (#148) * Add support for use as a context manager (#148) * Add support for `decode_content` arg * Fix streaming requests when used with memory backend (#188) * Verified that `PreparedRequest.body` is always encoded in utf-8, so no need to detect encoding (Re: TODO note) * Response creation time and expiration time are stored as CachedResponse, so the `(response, timestamp)` tuple is no longer necessary * Rename `response.expire_after` and `response.cache_date` to `expires` and `created_at`, respectively, based on browser cache directives * Add optional `expire_after` param to `CachedSession.remove_old_responses()` * Make `CachedSession` members `allowable_codes, allowable_methods, filter_fn, old_data_on_error` public, since they can safely be modified after initialization * More type annotations and docstring updates * Move main cache documentation from `CacheMixin` to CachedSession`, since that's probably where a user would look first * Wrap temporary `_request_expire_after` in a contextmanager * Add intersphinx links for `urllib` classes & methods * Fix linting issues raised by flake8 * Start adding some unit tests using requests-mock tmp
* Add sanity checks to get_cache, clear, and remove_expired_responses to make ↵Jordan Cook2021-03-041-1/+1
| | | | sure CachedSession is installed
* Refactor CachedSession to be usable as a mixin classJordan Cook2021-03-041-1/+1
|
* Remove all python 2 compatibilityJordan Cook2021-02-261-1/+0
|
* Apply code formatting with black + isortJordan Cook2021-02-261-5/+9
|
* Merge pull request #92 from ar90n/add_dynamodb_backendRoman Haritonov2017-06-011-1/+7
|\ | | | | add dynamodb backend
| * add dynamodb backendMasahiro Wada2017-05-141-1/+7
| |
* | add gridfs supportCheng Guangnan2017-04-011-0/+7
|/
* Fix #61. Ability to pass backend instance in install_cacheRoman Haritonov2016-03-191-2/+4
|
* More informative message for missing backend dependenciesGarrett-R2016-02-281-3/+14
| | | | | | | | | | | Currently, if you don't have the Python package `redis` intalled then you get the same message if you type: requests_cache.install_cache(backend='redis') as if you type: requests_cache.install_cache(backend='nonsense!!!!')
* Fix #15Roman Haritonov2013-10-091-0/+16
| | | | | - Check for backend availability when configuring cache, not when making first query. - Default backend is now chosen from sqlite and memory.
* Added Redis Backendmichaelbeaumont2013-04-171-0/+6
|
* Make sqlite3 optional for Heroku support. Thanks to @nathancahillRoman Haritonov2012-09-091-2/+9
|
* Use relative importsRoman Haritonov2012-05-111-3/+3
|
* refactor: rename MemoryCache to BaseCacheRoman2012-04-111-2/+2
|