Before you start, make sure you've created and initialized an EdgeKV database. You can perform the one-time EdgeKV database initialization using the CLI. This initializes the EdgeKV database on both staging and production. It also creates a “default” namespace on both staging and production.
The next step is to populate that database with data that can be consumed by your EdgeWorkers function.
This example shows you how to populate your EdgeKV database. Go to the getting-started section in the EdgeKV Hello World readme file for more information.
EdgeWorkers functions running on the production network can only be used with EdgeKV namespaces created on the production network. Similarly, EdgeWorkers running on the staging network can only access EdgeKV namespaces created on the staging network. This is to ensure separation of concerns for security reasons.
You can specify either staging or production environment using the parameter.
akamai edgekv write text staging default greetings en "Hello World" akamai edgekv write text staging default greetings fr "Bonjour le Monde" akamai edgekv write text staging default greetings es "Hola Mundo"
For a complete list of CLI commands refer to the CLI documentation.
Due to the eventual consistency properties of the EdgeKV store, your data update may take up to 10 seconds to be reflected in the response of a subsequent GET request.
Updated 9 months ago