The problem
DynamoDBBackend raises an exception when the HTTP response size is greater than 400kB. DynamoDB has a size limit of 400kB for an entity stored in the table.
Expected behavior
The cache could skip the HTTP response instead of trying to put it in the DynamoDB table. Another way would be to somehow split the response and put it as multiple entities.
Steps to reproduce the behavior
Try to perform HTTP GET on https://microsoftedge.github.io/Demos/json-dummy-data/5MB.json with DynamoDBBackend.
Workarounds
We can probably define a filter function for it so the heavy responses are not cached.
Environment
- aiohttp-client-cache version:
0.9.0
- Python version:
3.11
- Platform: macOS with
moto as DynamoDB mock