summaryrefslogtreecommitdiff
path: root/requests_cache/backends
Commit message (Collapse)AuthorAgeFilesLines
* Minor formatting changes for SQL queriesJordan Cook2021-04-291-20/+24
|
* Some more improvements for bulk deletes in SQLite backendJordan Cook2021-04-291-10/+32
|
* Improve performance a bit for remove_expired_responses()Jordan Cook2021-04-291-22/+31
|
* Add BaseCache.keys() and values() methodsJordan Cook2021-04-272-18/+45
| | | | | * Update `BaseCache.urls` to return a generator instead of the whole list at once (which may use too much memory for particularly large caches) * Update `BaseCache.urls` to just skip invalid responses instead of deleting them
* Bump black versionJordan Cook2021-04-261-1/+0
|
* Add use_temp option to SQLite backendJordan Cook2021-04-222-8/+21
| | | | Closes #243
* Move storage class __str__ methods to base class, and just show keys instead ↵Jordan Cook2021-04-226-15/+3
| | | | of items
* Store responses for filesystem backend in a 'responses' subdirectory, to ↵Jordan Cook2021-04-221-5/+7
| | | | avoid deleting redirects.sqlite with clear()
* For SQLite and filesystem backends, resolve file paths in BaseStorage class ↵Jordan Cook2021-04-212-8/+6
| | | | rather than BaseCache class
* Add a filesystem backendJordan Cook2021-04-213-1/+93
|
* Use shared connection to create initial SQLite tableJordan Cook2021-04-211-1/+1
|
* Merge pull request #240 from jsemric/use-thread-local-connections-for-sqliteJordan Cook2021-04-211-41/+21
|\ | | | | Use thread local connections for sqlite
| * remove locking of sqlite connectionjsemric2021-04-211-18/+10
| |
| * do not lock connection on readjsemric2021-04-211-4/+10
| |
| * make bulk commit use thread-local connectionjsemric2021-04-211-26/+7
| |
| * use thread local sqlite connectionsjsemric2021-04-201-16/+17
| |
* | Fix DynamoDbDict.__iter__ to return keys instead of values; update tests to ↵Jordan Cook2021-04-201-1/+1
|/ | | | test for this
* Allow passing any valid backend connection kwargs via BaseCacheJordan Cook2021-04-197-100/+106
| | | | | | | | * 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)
* Add option to manually cache response objectsJordan Cook2021-04-191-1/+2
| | | | Updates #98
* Replace deprecated pymongo Collection.count() with estimated_document_count()v0.6.3Jordan Cook2021-04-192-2/+2
|
* Don't show warnings for 'include_get_headers' and 'ignored_parameters' ↵Jordan Cook2021-04-181-7/+16
| | | | | | | kwargs in BaseStorage Also don't name them as private members, since they can safely by changed after initialization (e.g., `session.cache.include_get_headers = True`)
* Update GridFSPickleDict.__delitem__ to raise a KeyError for missing itemsJordan Cook2021-04-121-4/+8
|
* Add kwargs for AWS creds for DynamoDbDictJordan Cook2021-04-121-1/+11
|
* 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
* Make parent dirs for new SQLite databasesJordan Cook2021-04-111-8/+18
|
* Demote most logging.info statements to debugJordan Cook2021-04-102-3/+3
|
* Handle errors due to invalid responses in `BaseCache.urls`Jordan Cook2021-04-101-14/+18
|
* Add remove_old_entries() back to BaseCache as an alias with a DeprecationWarningJordan Cook2021-04-101-0/+5
|
* Improvements to Sphinx documentation:Jordan Cook2021-04-033-26/+24
| | | | | | | | | | | | | | * Use sphinx-apidoc to auto-generate sources for backend modules * Still manually adding other modules for more control over formatting * Add a couple more contributors I missed * Include contributors on readthedocs * Add 'all' Makefile target and clean auto-generated docs * Remove unused build targets in Makefile * Update interpshinx links that have moved * Fix some interpshinx links * Fix some `:ref:` links using auto-generated labels (and some manually added labels where convenient) * Fix some docstring formatting * Fix remaining build warnings
* Improve backend initialization:Jordan Cook2021-04-022-70/+79
| | | | | | | * 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
* Add 'verify' param to cache keyJordan Cook2021-04-011-2/+2
| | | | Closes #209
* Rename 'add_key_mapping' to 'save_redirect' and take a request instead of a ↵Jordan Cook2021-03-311-6/+7
| | | | cache key
* Fix BaseCache.urls to return only response URLs (no redirect keys)Jordan Cook2021-03-301-1/+1
|
* For SQLite backend, run VACUUM after remove_expired_responses()Jordan Cook2021-03-301-0/+10
|
* Move cache key utilities to a separate moduleJordan Cook2021-03-302-102/+12
|
* Add normalization for request jsonJordan Cook2021-03-302-5/+30
|
* Use url-normalize for additional URL normalization for cache keysJordan Cook2021-03-301-2/+6
|
* Also remove invalid responses when running remove_expired_responses()Jordan Cook2021-03-302-13/+16
|
* Add logging to main cache operationsJordan Cook2021-03-302-16/+33
|
* Update get_response + tests to check additional error typesJordan Cook2021-03-291-1/+1
|
* Remove some redundant module docstrings, and fix some ref linksJordan Cook2021-03-292-13/+1
|
* Handle AttributeErrors when a cached item can't be deserializedJordan Cook2021-03-291-1/+4
|
* Show warning when using pickle without itsdangerousJordan Cook2021-03-282-4/+12
|
* Expose timeout parameter for SQLite backendJordan Cook2021-03-241-15/+15
|
* Pass along optional kwargs to all storage classes, and make default table ↵Jordan Cook2021-03-247-42/+41
| | | | names consistent across backends (`'http_cache'`)
* Enable DynamoDB integration test with GitHub Actions and local ↵Jordan Cook2021-03-241-1/+1
| | | | docker-compose; use in-memory database
* Combine storage classes from backends.storage.* with their respective ↵Jordan Cook2021-03-2412-537/+453
| | | | backends in backends.*
* Add optional integration with intsdangerous for safer serializationJordan Cook2021-03-246-45/+89
|
* Rename BaseCache.keys_map property and its associated table to 'redirects'Jordan Cook2021-03-246-18/+16
|
* Add a 'urls' property on BaseCache to get all cached URLsJordan Cook2021-03-241-0/+8
| | | | Closes #155