fastly / Viceroy

Viceroy provides local testing for developers working with Compute.
https://fastly.dev/learning/compute/testing/#running-a-local-testing-server
Apache License 2.0
140 stars 35 forks source link

Switch to reading dictionaries during the `fastly_dictionary_open` call #379

Closed elliottt closed 2 weeks ago

elliottt commented 2 weeks ago

Read dictionaries during the open host call instead of once for each get call. This improves viceroy performance for large dictionaries, and more closely matches the semantics of the production environment, as changes made while the dictionary is open won't be reflected in subsequent get calls.

Additionally, remove the DictionaryName newtype, as it wasn't offering anything over using a String directly.

co-authored-by: Jamey Sharp jsharp@fastly.com