Dictionary
Deprecated: Use ConfigStore from
'fastly:config-store' instead.Class for accessing Fastly Edge Dictionaries.
Note: Can only be used when processing requests, not during build-time initialization.
Constructor
deprecatedView source
Deprecated: Use ConfigStore from
'fastly:config-store' instead.new Dictionary(name: string)Creates a new Dictionary object, providing access to the named Edge Dictionary.
Parameters
- name: string
The name of the Edge Dictionary.
Throws
TypeErrorif no Dictionary exists with the provided name.TypeErrorif the provided name is empty, longer than 255 characters, does not start with an ASCII alphabetical character, or contains characters other than ASCII alphanumerics, underscores, and spaces.
Methods
Deprecated: Use ConfigStore from
'fastly:config-store' instead.get(key: string): string | nullGet a value for a key in the Dictionary. If the provided key does not
exist in the Dictionary then this returns null.
Parameters
- key: string
The key to retrieve.
Returns
string | null
Throws
TypeErrorif the provided key is empty or longer than 255 characters.