From c2bd662386bcb54ebc9378ad5b2567d919e91a9f Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Mon, 6 Mar 2017 13:11:14 -0500 Subject: [PATCH] Switch physical cache map index value to md5 from sha1 for all the performances --- physical/cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/physical/cache.go b/physical/cache.go index 96f2586f31..5f3e81e915 100644 --- a/physical/cache.go +++ b/physical/cache.go @@ -1,7 +1,7 @@ package physical import ( - "crypto/sha1" + "crypto/md5" "encoding/hex" "fmt" "strings" @@ -59,7 +59,7 @@ func NewCache(b Backend, size int, logger log.Logger) *Cache { } func (c *Cache) lockHashForKey(key string) string { - hf := sha1.New() + hf := md5.New() hf.Write([]byte(key)) return strings.ToLower(hex.EncodeToString(hf.Sum(nil))[:2]) }