That will be awesome. Thank you!
That will be awesome. Thank you!
simple_query was required earlier (I believe until May 22 https://developers.cloudflare.com/hyperdrive/platform/changelog/#2024-05-22). With the prepared statement support in Hyperdrive, plain query also works with a caveat I mentioned (must turn on caching in Hyperdrive setting). The caveat is an issue in Hyperdrive (per @AJR), so once that is fixed, it will be all okay!
max-age is related to browser-side caching using HTTP headers. Hyperdrive has no ability to purge the browser-side cache so no.random() and ignoring that field in your result would do it.max-age. This is quite tricky to bust and you usually disable this for APIs in favor of 2.maxage, but if you want to only cache on the server-side you can use s-maxage instead.maxage in Hyperdrive dictates that caches maximum TTL per unique query. It’s not a CDN cache and doesn’t cache any results in the browser. maxage is just a common name for a TTL-based cache configuration setting.maxage in the Cache-Control header.id is not a secret, but I didn't find that mentioned in the documentation. It will be beneficial to have that mentioned officially.simple_query , take a look at our fork (the exograph branch), which supports query_with_type_params that works well with Hyperdrive.
CONNECTION_CLOSED Disabling the hyperdrive cache didn't help and I can't find any open issue on that topic in the postgres.js repo. Am I the only one?

[env.production]
[[env.production.hyperdrive]]
binding = "HYPERDRIVE"
id = "id-1"
[env.preview]
[[env.preview.hyperdrive]]
binding = "HYPERDRIVE"
id = "id-2"