LOG IN SIGN UP
Documentation

About Edge Dictionaries

Fastly offers instantly updatable, global, Edge Dictionaries for use with your services.

Edge Dictionaries simplify services

Edge Dictionaries are made up of dictionary containers and the dictionary items within them. In combination, containers and items allow you to store data as key-value pairs and turn frequently repeated statements like this:

if (something == "value1") {
  set other = "result1";
} else if (something == "value2") {
  set other = "result2";
}

into a single function that acts as constant:

table <ID> {
  "KEY_STRING": "VALUE_STRING",
  "KEY_STRING2": "VALUE_STRING2",
  ...
}

Once you attach a dictionary container to a version of your service with the API and that service is activated, the data in it becomes "versionless." This means you can add to and update the data an Edge Dictionary contains using a single API call at any time after it is created, without ever incrementing a service's version. You can perform lookups on the dictionary items in an Edge Dictionary using functions like table.lookup(<ID>, "KEY_STRING") or table.lookup(<ID>, "KEY_STRING", "DEFAULT_VALUE_STRING") in your configuration.

When Edge Dictionaries might be useful

Limitations and considerations

When creating Edge Dictionaries, keep the following things in mind as you develop your service configurations: