From 9f19d130ea79d3cd49f537a0b432fa8796328936 Mon Sep 17 00:00:00 2001 From: Thomas Gauvin Date: Mon, 23 Feb 2026 12:01:34 -0800 Subject: [PATCH 1/7] thomasgauvin: update docs for cache status volatile, stable functions --- ...yperdrive-stable-functions-uncacheable.mdx | 19 ++++ .../hyperdrive/concepts/query-caching.mdx | 101 +++++++++++++----- .../docs/hyperdrive/observability/metrics.mdx | 7 +- .../observability/troubleshooting.mdx | 12 ++- 4 files changed, 107 insertions(+), 32 deletions(-) create mode 100644 src/content/changelog/hyperdrive/2026-02-13-hyperdrive-stable-functions-uncacheable.mdx diff --git a/src/content/changelog/hyperdrive/2026-02-13-hyperdrive-stable-functions-uncacheable.mdx b/src/content/changelog/hyperdrive/2026-02-13-hyperdrive-stable-functions-uncacheable.mdx new file mode 100644 index 00000000000..16c07dc5c92 --- /dev/null +++ b/src/content/changelog/hyperdrive/2026-02-13-hyperdrive-stable-functions-uncacheable.mdx @@ -0,0 +1,19 @@ +--- +title: Queries using STABLE PostgreSQL functions are no longer cached +description: Hyperdrive marks queries containing STABLE PostgreSQL functions as uncacheable, preventing stale cached results. +products: + - hyperdrive +date: 2026-02-13 +--- + +Hyperdrive treats queries containing PostgreSQL `STABLE` functions as uncacheable, in addition to `VOLATILE` functions. + +Previously, only functions that PostgreSQL categorizes as `VOLATILE` (for example, `RANDOM()`, `LASTVAL()`) were detected as uncacheable. `STABLE` functions (for example, `NOW()`, `CURRENT_TIMESTAMP`, `CURRENT_DATE`) were incorrectly allowed to be cached. + +Because `STABLE` functions can return different results across different SQL statements within the same transaction, caching their results could serve stale or incorrect data. This change aligns Hyperdrive's caching behavior with PostgreSQL's function volatility semantics. + +If your queries use `STABLE` functions and you were relying on them being cached, move the function call to your application code and pass the result as a query parameter. For example, instead of `WHERE created_at > NOW()`, compute the timestamp in your Worker and pass it as `WHERE created_at > $1`. + +Hyperdrive uses text-based pattern matching to detect uncacheable functions. References to function names like `NOW()` in SQL comments also cause the query to be marked as uncacheable. + +For more information, refer to [query caching](/hyperdrive/concepts/query-caching/) and [troubleshooting uncacheable queries](/hyperdrive/observability/troubleshooting/). diff --git a/src/content/docs/hyperdrive/concepts/query-caching.mdx b/src/content/docs/hyperdrive/concepts/query-caching.mdx index 9a85e87d7c2..8e36fa5bd12 100644 --- a/src/content/docs/hyperdrive/concepts/query-caching.mdx +++ b/src/content/docs/hyperdrive/concepts/query-caching.mdx @@ -5,7 +5,7 @@ sidebar: order: 3 --- -import { TabItem, Tabs } from "~/components"; +import { TabItem, Tabs, WranglerConfig } from "~/components"; Hyperdrive automatically caches all cacheable queries executed against your database when query caching is turned on, reducing the need to go back to your database (incurring latency and database load) for every query which can be especially useful for popular queries. Query caching is enabled by default. @@ -18,45 +18,87 @@ Besides determining the difference between a `SELECT` and an `INSERT`, Hyperdriv For example, a read query that populates the front page of a news site would be cached: - + + ```sql --- Cacheable -SELECT * FROM articles WHERE DATE(published_time) = -CURRENT_DATE() ORDER BY published_time DESC LIMIT 50 +-- Cacheable: uses a parameterized date value instead of CURRENT_DATE +SELECT * FROM articles WHERE DATE(published_time) = $1 +ORDER BY published_time DESC LIMIT 50 ``` + + ```sql --- Cacheable -SELECT * FROM articles WHERE DATE(published_time) = -CURDATE() ORDER BY published_time DESC LIMIT 50 +-- Cacheable: uses a parameterized date value instead of CURDATE() +SELECT * FROM articles WHERE DATE(published_time) = ? +ORDER BY published_time DESC LIMIT 50 ``` + -Mutating queries (including `INSERT`, `UPSERT`, or `CREATE TABLE`) and queries that use [functions designated as `volatile` by PostgreSQL](https://www.postgresql.org/docs/current/xfunc-volatility.html) are not cached: +Mutating queries (including `INSERT`, `UPSERT`, or `CREATE TABLE`) and queries that use functions designated as [`volatile`](https://www.postgresql.org/docs/current/xfunc-volatility.html) or [`stable`](https://www.postgresql.org/docs/current/xfunc-volatility.html) by PostgreSQL are not cached: ```sql - -- Not cached + -- Not cached: mutating queries INSERT INTO users(id, name, email) VALUES(555, 'Matt', 'hello@example.com'); + -- Not cached: LASTVAL() is a volatile function SELECT LASTVAL(), * FROM articles LIMIT 50; + + -- Not cached: NOW() is a stable function + SELECT * FROM events WHERE created_at > NOW() - INTERVAL '1 hour'; ``` ```sql - -- Not cached + -- Not cached: mutating queries INSERT INTO users(id, name, email) VALUES(555, 'Thomas', 'hello@example.com'); + -- Not cached: LAST_INSERT_ID() is a volatile function SELECT LAST_INSERT_ID(), * FROM articles LIMIT 50; + + -- Not cached: NOW() returns a non-deterministic value + SELECT * FROM events WHERE created_at > NOW() - INTERVAL 1 HOUR; ``` +Common PostgreSQL functions that are **not cacheable** include: + +| Function | PostgreSQL volatility category | Cached | +| ------------------- | ------------------------------ | ------ | +| `NOW()` | STABLE | No | +| `CURRENT_TIMESTAMP` | STABLE | No | +| `CURRENT_DATE` | STABLE | No | +| `CURRENT_TIME` | STABLE | No | +| `LOCALTIME` | STABLE | No | +| `LOCALTIMESTAMP` | STABLE | No | +| `TIMEOFDAY()` | VOLATILE | No | +| `RANDOM()` | VOLATILE | No | +| `LASTVAL()` | VOLATILE | No | +| `TXID_CURRENT()` | STABLE | No | + +Only functions designated as `IMMUTABLE` by PostgreSQL (functions whose return value never changes for the same inputs) are compatible with Hyperdrive caching. If your query uses a `STABLE` or `VOLATILE` function, move the function call to your application code and pass the resulting value as a query parameter instead. + +:::caution[Function detection is text-based] +Hyperdrive uses text-based pattern matching to detect uncacheable functions in your queries. This means that even references to function names inside SQL comments will cause the query to be marked as uncacheable. + +For example, the following query would **not** be cached because `NOW()` appears in the comment: + +```sql +-- We removed NOW() to keep this query cacheable +SELECT * FROM api_keys WHERE hash = $1 AND deleted = false; +``` + +Avoid referencing uncacheable function names anywhere in your query text, including comments. +::: + ## Default cache settings The default caching behaviour for Hyperdrive is defined as below: @@ -129,24 +171,27 @@ export default { The Wrangler configuration remains the same both for PostgreSQL and MySQL. -```jsonc title="wrangler.jsonc" + + +```jsonc +{ + "hyperdrive": [ + { + "binding": "HYPERDRIVE", + "id": "", + }, { - // Rest of file - "hyperdrive": [ - { - "binding": "HYPERDRIVE", - "id": "" - }, - { - "binding": "HYPERDRIVE_CACHE_DISABLED", - "id": "" - } - ] - } - ``` + "binding": "HYPERDRIVE_CACHE_DISABLED", + "id": "", + }, + ], +} +``` + + ## Next steps -- Learn more about [How Hyperdrive works](/hyperdrive/concepts/how-hyperdrive-works/). -- Learn how to [Connect to PostgreSQL](/hyperdrive/examples/connect-to-postgres/) from Hyperdrive. -- Review [Troubleshooting common issues](/hyperdrive/observability/troubleshooting/) when connecting a database to Hyperdrive. +- For more information, refer to [How Hyperdrive works](/hyperdrive/concepts/how-hyperdrive-works/). +- To connect to PostgreSQL, refer to [Connect to PostgreSQL](/hyperdrive/examples/connect-to-postgres/). +- For troubleshooting guidance, refer to [Troubleshoot and debug](/hyperdrive/observability/troubleshooting/). diff --git a/src/content/docs/hyperdrive/observability/metrics.mdx b/src/content/docs/hyperdrive/observability/metrics.mdx index 5c981d56c28..999646b11c9 100644 --- a/src/content/docs/hyperdrive/observability/metrics.mdx +++ b/src/content/docs/hyperdrive/observability/metrics.mdx @@ -7,7 +7,7 @@ sidebar: import { DashButton } from "~/components"; -Hyperdrive exposes analytics that allow you to inspect query volume, query latency and cache ratios size across all and/or each Hyperdrive configuration in your account. +Hyperdrive exposes analytics that allow you to inspect query volume, query latency, and cache hit ratios for each Hyperdrive configuration in your account. ## Metrics @@ -23,6 +23,8 @@ Hyperdrive currently exports the below metrics as part of the `hyperdriveQueries | Query Latency | `queryLatency` | The time (in milliseconds) required to query (and receive results) from your database, as measured from your Hyperdrive connection pool(s). | | Event Status | `eventStatus` | Whether a query responded successfully (`complete`) or failed (`error`). | +The `volatile` cache status indicates the query contains a PostgreSQL function categorized as `STABLE` or `VOLATILE` (for example, `NOW()`, `RANDOM()`). Refer to [Query caching](/hyperdrive/concepts/query-caching/) for details on which functions affect cacheability. + Metrics can be queried (and are retained) for the past 31 days. ## View metrics in the dashboard @@ -32,6 +34,7 @@ Per-database analytics for Hyperdrive are available in the Cloudflare dashboard. 1. In the Cloudflare dashboard, go to the **Hyperdrive** page. + 2. Select an existing Hyperdrive configuration. 3. Select the **Metrics** tab. @@ -41,7 +44,7 @@ You can optionally select a time window to query. This defaults to the last 24 h You can programmatically query analytics for your Hyperdrive configurations via the [GraphQL Analytics API](/analytics/graphql-api/). This API queries the same datasets as the Cloudflare dashboard, and supports GraphQL [introspection](/analytics/graphql-api/features/discovery/introspection/). -Hyperdrives's GraphQL datasets require an `accountTag` filter with your Cloudflare account ID. Hyperdrive exposes the `hyperdriveQueriesAdaptiveGroups` dataset. +Hyperdrive's GraphQL datasets require an `accountTag` filter with your Cloudflare account ID. Hyperdrive exposes the `hyperdriveQueriesAdaptiveGroups` dataset. ## Write GraphQL queries diff --git a/src/content/docs/hyperdrive/observability/troubleshooting.mdx b/src/content/docs/hyperdrive/observability/troubleshooting.mdx index e88ef260e7f..c8321e8918d 100644 --- a/src/content/docs/hyperdrive/observability/troubleshooting.mdx +++ b/src/content/docs/hyperdrive/observability/troubleshooting.mdx @@ -60,9 +60,17 @@ Hyperdrive may also encounter `ErrorResponse` wire protocol messages sent by you | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | `Uncaught Error: No such module "node:"` | Your Cloudflare Workers project or a library that it imports is trying to access a Node module that is not available. | Enable [Node.js compatibility](/workers/runtime-apis/nodejs/) for your Cloudflare Workers project to maximize compatibility. | -### Driver errors +### Uncached queries + +If your queries are not being cached despite Hyperdrive having caching enabled, check the following: + +**Stable or volatile PostgreSQL functions in your query**: Queries that contain PostgreSQL functions categorized as `STABLE` or `VOLATILE` are not cacheable. Common examples include `NOW()`, `CURRENT_TIMESTAMP`, `CURRENT_DATE`, `RANDOM()`, and `LASTVAL()`. To resolve this, move the function call to your application code and pass the result as a query parameter. For example, instead of `WHERE created_at > NOW()`, compute the timestamp in your Worker and pass it as a parameter: `WHERE created_at > $1`. Refer to [Query caching](/hyperdrive/concepts/query-caching/) for a full list of uncacheable functions. -If your queries are not getting cached despite Hyperdrive having caching enabled, your driver may be configured such that your queries are not cacheable by Hyperdrive. This may happen if you are using the [Postgres.js](https://github.com/porsager/postgres) driver with [`prepare: false:`](https://github.com/porsager/postgres?tab=readme-ov-file#prepared-statements). To resolve this, enable prepared statements with `prepare: true`. +**Function names in SQL comments**: Hyperdrive uses text-based pattern matching to detect uncacheable functions. References to function names like `NOW()` in SQL comments cause the query to be treated as uncacheable, even if the function is not actually called. Remove any references to uncacheable function names from your query text, including comments. + +**Driver configuration**: Your driver may be configured such that your queries are not cacheable by Hyperdrive. This may happen if you are using the [Postgres.js](https://github.com/porsager/postgres) driver with [`prepare: false`](https://github.com/porsager/postgres?tab=readme-ov-file#prepared-statements). To resolve this, enable prepared statements with `prepare: true`. + +### Driver errors | Error Message | Details | Recommended fixes | | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | From b5cc02d19852cef4aafd53c23bb3db5330d17273 Mon Sep 17 00:00:00 2001 From: "ask-bonk[bot]" Date: Mon, 23 Feb 2026 20:24:57 +0000 Subject: [PATCH 2/7] Fix changelog link text, CI passes Co-authored-by: thomasgauvin --- .../2026-02-13-hyperdrive-stable-functions-uncacheable.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/hyperdrive/2026-02-13-hyperdrive-stable-functions-uncacheable.mdx b/src/content/changelog/hyperdrive/2026-02-13-hyperdrive-stable-functions-uncacheable.mdx index 16c07dc5c92..8d6329f49a1 100644 --- a/src/content/changelog/hyperdrive/2026-02-13-hyperdrive-stable-functions-uncacheable.mdx +++ b/src/content/changelog/hyperdrive/2026-02-13-hyperdrive-stable-functions-uncacheable.mdx @@ -16,4 +16,4 @@ If your queries use `STABLE` functions and you were relying on them being cached Hyperdrive uses text-based pattern matching to detect uncacheable functions. References to function names like `NOW()` in SQL comments also cause the query to be marked as uncacheable. -For more information, refer to [query caching](/hyperdrive/concepts/query-caching/) and [troubleshooting uncacheable queries](/hyperdrive/observability/troubleshooting/). +For more information, refer to [Query caching](/hyperdrive/concepts/query-caching/) and [Troubleshoot and debug](/hyperdrive/observability/troubleshooting/). From 86539f446602c59c3b7d1bc39d1e490c7190441f Mon Sep 17 00:00:00 2001 From: "ask-bonk[bot]" Date: Mon, 23 Feb 2026 22:17:27 +0000 Subject: [PATCH 3/7] Address 4 PR review comments Co-authored-by: mikenomitch --- ...026-02-23-hyperdrive-stable-functions-uncacheable.mdx} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename src/content/changelog/hyperdrive/{2026-02-13-hyperdrive-stable-functions-uncacheable.mdx => 2026-02-23-hyperdrive-stable-functions-uncacheable.mdx} (66%) diff --git a/src/content/changelog/hyperdrive/2026-02-13-hyperdrive-stable-functions-uncacheable.mdx b/src/content/changelog/hyperdrive/2026-02-23-hyperdrive-stable-functions-uncacheable.mdx similarity index 66% rename from src/content/changelog/hyperdrive/2026-02-13-hyperdrive-stable-functions-uncacheable.mdx rename to src/content/changelog/hyperdrive/2026-02-23-hyperdrive-stable-functions-uncacheable.mdx index 8d6329f49a1..e4c0812e7b3 100644 --- a/src/content/changelog/hyperdrive/2026-02-13-hyperdrive-stable-functions-uncacheable.mdx +++ b/src/content/changelog/hyperdrive/2026-02-23-hyperdrive-stable-functions-uncacheable.mdx @@ -1,14 +1,14 @@ --- -title: Queries using STABLE PostgreSQL functions are no longer cached +title: Hyperdrive no longer caches queries using STABLE PostgreSQL functions description: Hyperdrive marks queries containing STABLE PostgreSQL functions as uncacheable, preventing stale cached results. products: - hyperdrive -date: 2026-02-13 +date: 2026-02-23 --- -Hyperdrive treats queries containing PostgreSQL `STABLE` functions as uncacheable, in addition to `VOLATILE` functions. +Hyperdrive now treats queries containing PostgreSQL `STABLE` functions as uncacheable, in addition to `VOLATILE` functions. -Previously, only functions that PostgreSQL categorizes as `VOLATILE` (for example, `RANDOM()`, `LASTVAL()`) were detected as uncacheable. `STABLE` functions (for example, `NOW()`, `CURRENT_TIMESTAMP`, `CURRENT_DATE`) were incorrectly allowed to be cached. +Previously, only functions that PostgreSQL categorizes as [`VOLATILE`](https://www.postgresql.org/docs/current/xfunc-volatility.html) (for example, `RANDOM()`, `LASTVAL()`) were detected as uncacheable. `STABLE` functions (for example, `NOW()`, `CURRENT_TIMESTAMP`, `CURRENT_DATE`) were incorrectly allowed to be cached. Because `STABLE` functions can return different results across different SQL statements within the same transaction, caching their results could serve stale or incorrect data. This change aligns Hyperdrive's caching behavior with PostgreSQL's function volatility semantics. From 588ca6ec344327559bad1f5d7c80a536c831fd2f Mon Sep 17 00:00:00 2001 From: "ask-bonk[bot]" Date: Mon, 23 Feb 2026 22:28:36 +0000 Subject: [PATCH 4/7] Move link to "that PostgreSQL categorizes" Co-authored-by: mikenomitch --- .../2026-02-23-hyperdrive-stable-functions-uncacheable.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/hyperdrive/2026-02-23-hyperdrive-stable-functions-uncacheable.mdx b/src/content/changelog/hyperdrive/2026-02-23-hyperdrive-stable-functions-uncacheable.mdx index e4c0812e7b3..64eecad8d87 100644 --- a/src/content/changelog/hyperdrive/2026-02-23-hyperdrive-stable-functions-uncacheable.mdx +++ b/src/content/changelog/hyperdrive/2026-02-23-hyperdrive-stable-functions-uncacheable.mdx @@ -8,7 +8,7 @@ date: 2026-02-23 Hyperdrive now treats queries containing PostgreSQL `STABLE` functions as uncacheable, in addition to `VOLATILE` functions. -Previously, only functions that PostgreSQL categorizes as [`VOLATILE`](https://www.postgresql.org/docs/current/xfunc-volatility.html) (for example, `RANDOM()`, `LASTVAL()`) were detected as uncacheable. `STABLE` functions (for example, `NOW()`, `CURRENT_TIMESTAMP`, `CURRENT_DATE`) were incorrectly allowed to be cached. +Previously, only functions [that PostgreSQL categorizes](https://www.postgresql.org/docs/current/xfunc-volatility.html) as `VOLATILE` (for example, `RANDOM()`, `LASTVAL()`) were detected as uncacheable. `STABLE` functions (for example, `NOW()`, `CURRENT_TIMESTAMP`, `CURRENT_DATE`) were incorrectly allowed to be cached. Because `STABLE` functions can return different results across different SQL statements within the same transaction, caching their results could serve stale or incorrect data. This change aligns Hyperdrive's caching behavior with PostgreSQL's function volatility semantics. From 3bbe77aa4884d5ae953a447f550da97cb040303e Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Tue, 24 Feb 2026 09:46:55 +0000 Subject: [PATCH 5/7] Apply suggestions from code review --- .../2026-02-23-hyperdrive-stable-functions-uncacheable.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/changelog/hyperdrive/2026-02-23-hyperdrive-stable-functions-uncacheable.mdx b/src/content/changelog/hyperdrive/2026-02-23-hyperdrive-stable-functions-uncacheable.mdx index 64eecad8d87..75bca3d2122 100644 --- a/src/content/changelog/hyperdrive/2026-02-23-hyperdrive-stable-functions-uncacheable.mdx +++ b/src/content/changelog/hyperdrive/2026-02-23-hyperdrive-stable-functions-uncacheable.mdx @@ -12,7 +12,7 @@ Previously, only functions [that PostgreSQL categorizes](https://www.postgresql. Because `STABLE` functions can return different results across different SQL statements within the same transaction, caching their results could serve stale or incorrect data. This change aligns Hyperdrive's caching behavior with PostgreSQL's function volatility semantics. -If your queries use `STABLE` functions and you were relying on them being cached, move the function call to your application code and pass the result as a query parameter. For example, instead of `WHERE created_at > NOW()`, compute the timestamp in your Worker and pass it as `WHERE created_at > $1`. +If your queries use `STABLE` functions, and you were relying on them being cached, move the function call to your application code and pass the result as a query parameter. For example, instead of `WHERE created_at > NOW()`, compute the timestamp in your Worker and pass it as `WHERE created_at > $1`. Hyperdrive uses text-based pattern matching to detect uncacheable functions. References to function names like `NOW()` in SQL comments also cause the query to be marked as uncacheable. From cec765c60170e50c5669f0e61164d43fa0dc1c73 Mon Sep 17 00:00:00 2001 From: Thomas Gauvin <35609369+thomasgauvin@users.noreply.github.com> Date: Tue, 24 Feb 2026 10:21:44 -0800 Subject: [PATCH 6/7] Update src/content/docs/hyperdrive/observability/troubleshooting.mdx Co-authored-by: Maddy <130055405+Maddy-Cloudflare@users.noreply.github.com> --- src/content/docs/hyperdrive/observability/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/hyperdrive/observability/troubleshooting.mdx b/src/content/docs/hyperdrive/observability/troubleshooting.mdx index c8321e8918d..968d5ebee7f 100644 --- a/src/content/docs/hyperdrive/observability/troubleshooting.mdx +++ b/src/content/docs/hyperdrive/observability/troubleshooting.mdx @@ -64,7 +64,7 @@ Hyperdrive may also encounter `ErrorResponse` wire protocol messages sent by you If your queries are not being cached despite Hyperdrive having caching enabled, check the following: -**Stable or volatile PostgreSQL functions in your query**: Queries that contain PostgreSQL functions categorized as `STABLE` or `VOLATILE` are not cacheable. Common examples include `NOW()`, `CURRENT_TIMESTAMP`, `CURRENT_DATE`, `RANDOM()`, and `LASTVAL()`. To resolve this, move the function call to your application code and pass the result as a query parameter. For example, instead of `WHERE created_at > NOW()`, compute the timestamp in your Worker and pass it as a parameter: `WHERE created_at > $1`. Refer to [Query caching](/hyperdrive/concepts/query-caching/) for a full list of uncacheable functions. +- **Stable or volatile PostgreSQL functions in your query**: Queries that contain PostgreSQL functions categorized as `STABLE` or `VOLATILE` are not cacheable. Common examples include `NOW()`, `CURRENT_TIMESTAMP`, `CURRENT_DATE`, `RANDOM()`, and `LASTVAL()`. To resolve this, move the function call to your application code and pass the result as a query parameter. For example, instead of `WHERE created_at > NOW()`, compute the timestamp in your Worker and pass it as a parameter: `WHERE created_at > $1`. Refer to [Query caching](/hyperdrive/concepts/query-caching/) for a full list of uncacheable functions. **Function names in SQL comments**: Hyperdrive uses text-based pattern matching to detect uncacheable functions. References to function names like `NOW()` in SQL comments cause the query to be treated as uncacheable, even if the function is not actually called. Remove any references to uncacheable function names from your query text, including comments. From 4ed515edcaa70f879f7665f413ea08624c255c13 Mon Sep 17 00:00:00 2001 From: Thomas Gauvin <35609369+thomasgauvin@users.noreply.github.com> Date: Tue, 24 Feb 2026 10:22:24 -0800 Subject: [PATCH 7/7] Update src/content/docs/hyperdrive/observability/troubleshooting.mdx Co-authored-by: Maddy <130055405+Maddy-Cloudflare@users.noreply.github.com> --- src/content/docs/hyperdrive/observability/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/hyperdrive/observability/troubleshooting.mdx b/src/content/docs/hyperdrive/observability/troubleshooting.mdx index 968d5ebee7f..d434d1c43dc 100644 --- a/src/content/docs/hyperdrive/observability/troubleshooting.mdx +++ b/src/content/docs/hyperdrive/observability/troubleshooting.mdx @@ -68,7 +68,7 @@ If your queries are not being cached despite Hyperdrive having caching enabled, **Function names in SQL comments**: Hyperdrive uses text-based pattern matching to detect uncacheable functions. References to function names like `NOW()` in SQL comments cause the query to be treated as uncacheable, even if the function is not actually called. Remove any references to uncacheable function names from your query text, including comments. -**Driver configuration**: Your driver may be configured such that your queries are not cacheable by Hyperdrive. This may happen if you are using the [Postgres.js](https://github.com/porsager/postgres) driver with [`prepare: false`](https://github.com/porsager/postgres?tab=readme-ov-file#prepared-statements). To resolve this, enable prepared statements with `prepare: true`. +- **Driver configuration**: Your driver may be configured such that your queries are not cacheable by Hyperdrive. This may happen if you are using the [Postgres.js](https://github.com/porsager/postgres) driver with [`prepare: false`](https://github.com/porsager/postgres?tab=readme-ov-file#prepared-statements). To resolve this, enable prepared statements with `prepare: true`. ### Driver errors