From aa761f98ca40b96d50ab19240f2076cce29feb8a Mon Sep 17 00:00:00 2001 From: Trivernis Date: Sun, 29 Sep 2019 17:24:59 +0200 Subject: [PATCH] MemoryCache performance improvement - switched to faster sha-1 function for hash strings --- src/lib/MemoryCache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/MemoryCache.ts b/src/lib/MemoryCache.ts index 17890d8..1e76834 100644 --- a/src/lib/MemoryCache.ts +++ b/src/lib/MemoryCache.ts @@ -20,7 +20,7 @@ export class MemoryCache extends EventEmitter { * @param key */ public hashKey(key: string): string { - const hash = crypto.createHash("md5"); + const hash = crypto.createHash("sha1"); const data = hash.update(key, "utf8"); return data.digest("hex"); }