bitte
bitte
CDCloudflare Developers
Created by bitte on 6/29/2023 in #workers-help
Efficient caching strategy for querying hundreds of records
My use case involves clients querying an API to retrieve records for up to 200 IDs at a time. To minimize the number of requests and without relying on HTTP/2 multiplexing for hundreds of GETs, what's the optimal strategy here to cache each individual ID as it's retrieved so I'm not hitting the db every time? Should I send POST batches of 50 IDs and perform 50 cacheable GET subqueries on the Worker?
8 replies