From 4d3cf0e58d95d1a3b7a8ba6100e6e2cf4ad08133 Mon Sep 17 00:00:00 2001 From: Kristian Freeman Date: Mon, 6 May 2019 15:27:18 -0500 Subject: [PATCH] KV key doesn't need to be encoded in a worker --- src/kv-cache.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/kv-cache.js b/src/kv-cache.js index b9afe46..b284531 100644 --- a/src/kv-cache.js +++ b/src/kv-cache.js @@ -1,7 +1,6 @@ class KVCache { get(key) { - const encodedKey = encodeURIComponent(key) - return GRAPHQL_ON_WORKERS.get(encodedKey) + return GRAPHQL_ON_WORKERS.get(key) } set(key, value, options) { @@ -10,8 +9,7 @@ class KVCache { if (ttl) { opts.expirationTtl = ttl } - const encodedKey = encodeURIComponent(key) - return GRAPHQL_ON_WORKERS.put(encodedKey, value, opts) + return GRAPHQL_ON_WORKERS.put(key, value, opts) } }