From f9291ef062e725e2773ccaeb766fd77843eed947 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Thu, 27 Mar 2025 17:20:39 +0000 Subject: [PATCH] Rendering the same file into Hyperdrive Wrangler. Updating Getting started for clarity. --- src/content/docs/hyperdrive/get-started.mdx | 10 +++++++++- .../docs/hyperdrive/reference/wrangler-commands.mdx | 5 ++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/content/docs/hyperdrive/get-started.mdx b/src/content/docs/hyperdrive/get-started.mdx index 3e22c93f6d320f..04ffae4d9ae111 100644 --- a/src/content/docs/hyperdrive/get-started.mdx +++ b/src/content/docs/hyperdrive/get-started.mdx @@ -11,7 +11,7 @@ Hyperdrive accelerates access to your existing databases from Cloudflare Workers By maintaining a connection pool to your database within Cloudflare's network, Hyperdrive reduces seven round-trips to your database before you can even send a query: the TCP handshake (1x), TLS negotiation (3x), and database authentication (3x). -Hyperdrive understands the difference between read and write queries to your database, and can cache the most common read queries, improving performance and reducing load on your origin database. +Hyperdrive understands the difference between read and write queries to your database, and caches the most common read queries, improving performance and reducing load on your origin database. This guide will instruct you through: @@ -125,6 +125,14 @@ To create a Hyperdrive connection, run the `wrangler` command, replacing the pla npx wrangler hyperdrive create --connection-string="postgres://user:password@HOSTNAME_OR_IP_ADDRESS:PORT/database_name" ``` +:::note[Manage caching] +If you wish to disable caching, pass the flag `--caching-disabled`. + +Alternatively, you can use the `--max-age` flag to specify the maximum duration (in seconds) for which items should persist in the cache, before they are evicted. Default value is 60 seconds. + +Refer to [Hyperdrive Wrangler commands](/hyperdrive/reference/wrangler-commands/) for more information. +::: + If successful, the command will output your new Hyperdrive configuration: ```json diff --git a/src/content/docs/hyperdrive/reference/wrangler-commands.mdx b/src/content/docs/hyperdrive/reference/wrangler-commands.mdx index 967fc0d27d313f..d78bfbc25c0b98 100644 --- a/src/content/docs/hyperdrive/reference/wrangler-commands.mdx +++ b/src/content/docs/hyperdrive/reference/wrangler-commands.mdx @@ -1,8 +1,11 @@ --- pcx_content_type: navigation title: Wrangler commands -external_link: /workers/wrangler/commands/#hyperdrive sidebar: order: 12 --- + +import { Render } from "~/components"; + + \ No newline at end of file