Currently my query is 100% read-only but uses parameters for pagination (limit/offset), and I’d like them to be cached. I do not see any mention of this behaviour in this doc: Query caching · Hyperdrive docs
Can you share your postgres.js configuration? Both queries should be entirely cacheable from my understanding. Are you perhaps using prepare: false? This was needed in the past before Hyperdrive supported prepared statements, but isn’t any longer.
I should also mention how I’m “testing” if a query is getting cached. I’m simply comparing the response times of my worker.
Without parameters query: 20-50ms average response time
With parameters query: 200-300ms average response time
The chart in the dashboard doesn’t update very quickly so observing the numbers there is much slower than just checking the responses times. I know it’s not the most scientific method, but the response times are so consistent and different it seems good enough.