Skip to content

Commit 44d5958

Browse files
committed
Explicitly spelling "key-value" where relevant.
1 parent 6128149 commit 44d5958

File tree

18 files changed

+37
-38
lines changed

18 files changed

+37
-38
lines changed

src/content/docs/browser-rendering/get-started/screenshots.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ npm install @cloudflare/puppeteer --save-dev
4545

4646
Browser Rendering can be used with other developer products. You might need a [relational database](/d1/), an [R2 bucket](/r2/) to archive your crawled pages and assets, a [Durable Object](/durable-objects/) to keep your browser instance alive and share it with multiple requests, or [Queues](/queues/) to handle your jobs asynchronous.
4747

48-
For the purpose of this guide, you are going to use a [Workers KV store](/kv/concepts/kv-namespaces/) to cache your screenshots.
48+
For the purpose of this guide, you are going to use [Workers KV](/kv/concepts/kv-namespaces/) to cache your screenshots.
4949

5050
Create two namespaces, one for production, and one for development.
5151

src/content/docs/data-localization/compatibility.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,6 @@ The table below provides a summary of the Data Localization Suite product's beha
139139
[^31]: DLP is part of Gateway HTTP, however, [DLP datasets](/cloudflare-one/policies/data-loss-prevention/datasets/#use-dlp-datasets) are not available outside US region when using Customer Metadata Boundary.
140140
[^32]: Dashboard Analytics are empty when using CMB outside the US region. Use Logpush instead.
141141
[^33]: [Outgoing zone transfers](/dns/zone-setups/zone-transfers/cloudflare-as-primary/) will carry Earth region proxy IPs, thus making regional service dysfunctional when non-Cloudflare nameservers respond to the DNS queries.
142-
[^34]: Jurisdictional Restrictions (storage) for Workers KV pairs is not supported today.
142+
[^34]: Jurisdictional Restrictions (storage) for Workers KV is not supported today.
143143
[^35]: Logs / Analytics not available outside US region when using Customer Metadata Boundary. Jurisdictional Restrictions (storage) options are not supported today.
144144
[^36]: Only when using a [Custom Domain](/images/manage-images/serve-images/serve-from-custom-domains/) set to a region.

src/content/docs/dns/manage-dns-records/how-to/batch-record-changes.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { GlossaryTooltip, Example, Render } from "~/components";
1010
Cloudflare allows you to apply several changes to your zone records in just one action. You can [use the dashboard](#use-the-dashboard) to delete DNS records or update their <GlossaryTooltip term="proxy status">proxy status</GlossaryTooltip> in bulk, or [use the API](#use-the-api) to perform further batched operations.
1111

1212
:::caution[Propagation through the Cloudflare network]
13-
Although Cloudflare will execute the batched operations in a single [database transaction](https://en.wikipedia.org/wiki/Database_transaction), Cloudflare's distributed KV store must treat each record change as a single key-value pair. This means that the propagation of changes is not atomic. Refer to our [blog post](https://blog.cloudflare.com/batched-dns-changes/) for details.
13+
Although Cloudflare will execute the batched operations in a single [database transaction](https://en.wikipedia.org/wiki/Database_transaction), Cloudflare's distributed key-value store must treat each record change as a single key-value pair. This means that the propagation of changes is not atomic. Refer to our [blog post](https://blog.cloudflare.com/batched-dns-changes/) for details.
1414
:::
1515

1616
## Availability and limits
@@ -91,7 +91,7 @@ Within each of these four lists, each individual action is executed following th
9191
### Aspects to consider
9292

9393
:::caution[Propagation through the Cloudflare network]
94-
Although Cloudflare will execute the batched operations in a single [database transaction](https://en.wikipedia.org/wiki/Database_transaction), Cloudflare's distributed KV store must treat each record change as a single key-value pair. This means that the propagation of changes is not atomic. Refer to our [blog post](https://blog.cloudflare.com/batched-dns-changes/) for details.
94+
Although Cloudflare will execute the batched operations in a single [database transaction](https://en.wikipedia.org/wiki/Database_transaction), Cloudflare's distributed key-value store must treat each record change as a single key-value pair. This means that the propagation of changes is not atomic. Refer to our [blog post](https://blog.cloudflare.com/batched-dns-changes/) for details.
9595
:::
9696

9797
For each operation that you list in the `/batch` request body, consider the required information and how unspecified fields will behave:

src/content/docs/durable-objects/api/sql-storage.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class MyDurableObject extends DurableObject {
3737
SQL API methods accessed with `ctx.storage.sql` are only allowed on [Durable Object classes with SQLite storage backend](/durable-objects/reference/durable-objects-migrations/#enable-sqlite-storage-backend-on-new-durable-object-class-migration) and will return an error if called on Durable Object classes with a key-value storage backend.
3838
:::
3939

40-
Specifically for Durable Object classes with SQLite storage backend, KV operations which were previously asynchronous (for example, [`get`](/durable-objects/api/storage-api/#get), [`put`](/durable-objects/api/storage-api/#put), [`delete`](/durable-objects/api/storage-api/#delete), [`deleteAll`](/durable-objects/api/storage-api/#deleteall), [`list`](/durable-objects/api/storage-api/#list)) are synchronous, even though they return promises. These methods will have completed their operations before they return the promise.
40+
Specifically for Durable Object classes with SQLite storage backend, key-value operations which were previously asynchronous (for example, [`get`](/durable-objects/api/storage-api/#get), [`put`](/durable-objects/api/storage-api/#put), [`delete`](/durable-objects/api/storage-api/#delete), [`deleteAll`](/durable-objects/api/storage-api/#deleteall), [`list`](/durable-objects/api/storage-api/#list)) are synchronous, even though they return promises. These methods will have completed their operations before they return the promise.
4141

4242
## Methods
4343

src/content/docs/kv/api/delete-key-value-pairs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Calling the `delete()` method will remove the key and value from your Workers KV
7070

7171
Delete more than one key-value pair at a time with Wrangler or [via the REST API](/api/operations/workers-kv-namespace-delete-multiple-key-value-pairs).
7272

73-
The bulk REST API can accept up to 10,000 KV pairs at once. Bulk writes are not supported using the [Workers KV binding](/kv/concepts/kv-bindings/).
73+
The bulk REST API can accept up to 10,000 key-value pairs at once. Bulk writes are not supported using the [Workers KV binding](/kv/concepts/kv-bindings/).
7474

7575
## Other methods to access Workers KV
7676
You can also [delete key-value pairs from the command line with Wrangler](/kv/reference/kv-commands/#delete) or [with the REST API](/api/operations/workers-kv-namespace-delete-key-value-pair).

src/content/docs/kv/api/read-key-value-pairs.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The `get()` method returns a promise you can `await` on to get the value. If the
5656
#### Parameters
5757
5858
- `key`: `string`
59-
- The key of the KV pair.
59+
- The key of the key-value pair.
6060
- `type`: `"text" | "json" | "arrayBuffer" | "stream"`
6161
- Optional. The type of the value to be returned. `text` is the default.
6262
- `options`: `{
@@ -68,7 +68,7 @@ The `get()` method returns a promise you can `await` on to get the value. If the
6868
#### Response
6969
7070
- `response`: `Promise<string | Object | ArrayBuffer | ReadableStream | null>`
71-
- The value for the requested KV pair. The response type will depend on the `type` parameter provided for the `get()` command as follows:
71+
- The value for the requested key-value pair. The response type will depend on the `type` parameter provided for the `get()` command as follows:
7272
- `text`: A `string` (default).
7373
- `json`: An object decoded from a JSON string.
7474
- `arrayBuffer`: An [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance.
@@ -91,7 +91,7 @@ Metadata is a serializable value you append to each KV entry.
9191
#### Parameters
9292
9393
- `key`: `string`
94-
- The key of the KV pair.
94+
- The key of the key-value pair.
9595
- `type`: `"text" | "json" | "arrayBuffer" | "stream"`
9696
- Optional. The type of the value to be returned. `text` is the default.
9797
- `options`: `{
@@ -107,7 +107,7 @@ value: string | Object | ArrayBuffer | ReadableStream | null,
107107
metadata: string | null
108108
}>`
109109
110-
- An object containing the value and the metadata for the requested KV pair. The type of the value attribute will depend on the `type` parameter provided for the `getWithMetadata()` command as follows:
110+
- An object containing the value and the metadata for the requested key-value pair. The type of the value attribute will depend on the `type` parameter provided for the `getWithMetadata()` command as follows:
111111
- `text`: A `string` (default).
112112
- `json`: An object decoded from a JSON string.
113113
- `arrayBuffer`: An [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) instance.

src/content/docs/kv/api/write-key-value-pairs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ Refer to [How Workers KV works](/kv/concepts/how-kv-works/) for more information
8686
8787
Write more than one key-value pair at a time with Wrangler or [via the REST API](/api/operations/workers-kv-namespace-write-multiple-key-value-pairs).
8888
89-
The bulk API can accept up to 10,000 KV pairs at once.
89+
The bulk API can accept up to 10,000 key-value pairs at once.
9090
91-
A `key` and a `value` are required for each KV pair. The entire request size must be less than 100 megabytes. Bulk writes are not supported using the [Workers KV binding](/kv/concepts/kv-bindings/).
91+
A `key` and a `value` are required for each key-value pair. The entire request size must be less than 100 megabytes. Bulk writes are not supported using the [Workers KV binding](/kv/concepts/kv-bindings/).
9292
9393
### Expiring keys
9494

src/content/docs/kv/concepts/how-kv-works.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Changes are usually immediately visible in the Cloudflare global network locatio
4444

4545
Negative lookups indicating that the key does not exist are also cached, so the same delay exists noticing a value is created as when a value is changed.
4646

47-
Workers KV does not perform like an in-memory datastore, such as [Redis](https://redis.io). Accessing KV values, even when locally cached, has significantly more latency than reading a value from memory within a Worker script.
47+
Workers KV does not perform like an in-memory datastore, such as [Redis](https://redis.io). Accessing key-value values, even when locally cached, has significantly more latency than reading a value from memory within a Worker script.
4848

4949
## Consistency
5050

@@ -54,11 +54,10 @@ Visibility of changes takes longer in locations which have recently read a previ
5454

5555
:::note
5656

57-
Workers KV is not ideal for applications where you need support for atomic operations or where values must be read and written in a single transaction.
58-
If you need stronger consistency guarantees, consider using [Durable Objects](/durable-objects/).
57+
Workers KV is not ideal for applications where you need support for atomic operations or where values must be read and written in a single transaction. If you need stronger consistency guarantees, consider using [Durable Objects](/durable-objects/).
5958
:::
6059

61-
An approach to achieve write-after-write consistency is to send all of your writes for a given KV key through a corresponding instance of a Durable Object, and then read that value from KV in other Workers. This is useful if you need more control over writes, but are satisfied with KV's read characteristics described above.
60+
An approach to achieve write-after-write consistency is to send all of your writes for a given key-value key through a corresponding instance of a Durable Object, and then read that value from Workers KV in other Workers. This is useful if you need more control over writes, but are satisfied with Workers KV's read characteristics described above.
6261

6362
## Security
6463

src/content/docs/kv/examples/workers-kv-to-serve-assets.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ npm install --save-dev @types/accept-language-parser
5555

5656
## 2. Create a new Workers KV namespace
5757

58-
Next, we will create a KV store. This can be done through the Cloudflare dashboard or the Wrangler CLI. For this example, we will use the Wrangler CLI.
58+
Next, we will create a key-value store. This can be done through the Cloudflare dashboard or the Wrangler CLI. For this example, we will use the Wrangler CLI.
5959

60-
To create a KV store via Wrangler:
60+
To create a key-value store via Wrangler:
6161

6262
1. Open your terminal and run the following command:
6363

@@ -128,20 +128,20 @@ We now have one Workers KV binding that will use the production Workers KV names
128128

129129
To store static assets in Workers KV, you can use the Wrangler CLI, the Workers KV binding from a Worker application, or the Workers KV REST API. We will demonstrate how to use the Wrangler CLI.
130130

131-
For this scenario, we'll be storing a sample HTML file within our KV store. Create a new file `index.html` in the root of project with the following content:
131+
For this scenario, we'll be storing a sample HTML file within our key-value store. Create a new file `index.html` in the root of project with the following content:
132132

133133
```html title="index.html"
134134
Hello World!
135135
```
136136

137-
We can then use the following Wrangler commands to create a KV pair for this file within our production and preview namespaces:
137+
We can then use the following Wrangler commands to create a key-value pair for this file within our production and preview namespaces:
138138

139139
```sh
140140
npx wrangler kv key put index.html --path index.html --binding assets --preview false
141141
npx wrangler kv key put index.html --path index.html --binding assets --preview
142142
```
143143

144-
This will create a KV pair with the filename as key and the file content as value, within the our production and preview namespaces specified by your binding in your `wrangler.toml` file.
144+
This will create a key-value pair with the filename as key and the file content as value, within the our production and preview namespaces specified by your binding in your `wrangler.toml` file.
145145

146146
## 4. Serve static assets from Workers KV from your Worker application
147147

@@ -180,7 +180,7 @@ export default {
180180
mimeType += "; charset=utf-8";
181181
}
182182

183-
//get the value from the KV store and return it if found
183+
//get the value from the key-value store and return it if found
184184
const value = await env.assets.get(key, 'arrayBuffer')
185185
if(!value){
186186
return new Response("Not found", {
@@ -197,7 +197,7 @@ export default {
197197
} satisfies ExportedHandler<Env>;
198198
```
199199

200-
This code will use the path within the URL and find the file associated to the path within the KV store. It also sets the proper MIME type in the response to indicate to the browser how to handle the response. To retrieve the value from the KV store, this code uses `arrayBuffer` to properly handle binary data such as images, documents, and video/audio files.
200+
This code will use the path within the URL and find the file associated to the path within the key-value store. It also sets the proper MIME type in the response to indicate to the browser how to handle the response. To retrieve the value from the key-value store, this code uses `arrayBuffer` to properly handle binary data such as images, documents, and video/audio files.
201201

202202
To start the Worker, run the following within a terminal:
203203

@@ -218,7 +218,7 @@ Your worker has access to the following bindings:
218218
[wrangler:inf] Ready on http://localhost:<PORT>
219219
```
220220

221-
Access the URL provided by the Wrangler command as such `http://localhost:<PORT>/index.html`. You will be able to see the returned HTML file containing the file contents of our `index.html` file that was added to our KV store. Try it out with an image or a document and you will see that this Worker is also properly serving those assets from Workers KV.
221+
Access the URL provided by the Wrangler command as such `http://localhost:<PORT>/index.html`. You will be able to see the returned HTML file containing the file contents of our `index.html` file that was added to our key-value store. Try it out with an image or a document and you will see that this Worker is also properly serving those assets from Workers KV.
222222

223223
## 5. Create an endpoint to generate dynamic responses from your key-value pairs
224224

@@ -344,7 +344,7 @@ export default {
344344
mimeType += "; charset=utf-8";
345345
}
346346

347-
//get the value from the KV store and return it if found
347+
//get the value from the key-value store and return it if found
348348
const value = await env.assets.get(key, 'arrayBuffer')
349349
if(!value){
350350
return new Response("Not found", {
@@ -361,7 +361,7 @@ export default {
361361
} satisfies ExportedHandler<Env>;
362362
```
363363

364-
This new code provides a specific endpoint, `/hello-world`, which will provide translated responses. When this URL is accessed, our Worker code will first retrieve the language that is requested by the client in the `Accept-Language` request header and the translations from our KV store for the `hello-world.json` key. It then gets the translated message and returns the generated HTML.
364+
This new code provides a specific endpoint, `/hello-world`, which will provide translated responses. When this URL is accessed, our Worker code will first retrieve the language that is requested by the client in the `Accept-Language` request header and the translations from our key-value store for the `hello-world.json` key. It then gets the translated message and returns the generated HTML.
365365

366366
```sh
367367
npx wrangler dev --remote
@@ -379,7 +379,7 @@ npx wrangler deploy
379379

380380
Wrangler will automatically set your Workers KV binding to use the production Workers KV namespace set in our `wrangler.toml` file with the Workers KV namespace id. Throughout this example, we uploaded our assets to both the preview and the production Workers KV namespaces.
381381

382-
We can now verify that our project is properly working by accessing our Workers default hostname and accessing `<WORKER-SUBDOMAIN>.<DEFAULT-ACCOUNT-HOSTNAME>.dev/index.html` or `<WORKER-SUBDOMAIN>.<DEFAULT-ACCOUNT-HOSTNAME>.dev/hello-world` to see our deployed Worker in action, generating responses from the values in our KV store.
382+
We can now verify that our project is properly working by accessing our Workers default hostname and accessing `<WORKER-SUBDOMAIN>.<DEFAULT-ACCOUNT-HOSTNAME>.dev/index.html` or `<WORKER-SUBDOMAIN>.<DEFAULT-ACCOUNT-HOSTNAME>.dev/hello-world` to see our deployed Worker in action, generating responses from the values in our key-value store.
383383

384384
## Related resources
385385

src/content/docs/kv/get-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ A [Workers KV namespace](/kv/concepts/kv-namespaces/) is a key-value database re
107107

108108
:::note
109109

110-
KV operations are scoped to your account.
110+
Key-value operations are scoped to your account.
111111
:::
112112

113113
To create a Workers KV namespace via Wrangler:

0 commit comments

Comments
 (0)