Skip to content

Commit

Permalink
Partially works!
Browse files Browse the repository at this point in the history
  • Loading branch information
lonelycode committed Mar 19, 2015
1 parent c55c289 commit 4708768
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion storage_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/spaolacci/murmur3"
"time"
"hash"
"encoding/hex"
)

// KeyError is a standard error for when a key is not found in the storage engine
Expand Down Expand Up @@ -168,8 +169,11 @@ func (r *RedisStorageManager) fixKey(keyName string) string {
setKeyName := r.KeyPrefix + keyName
var h64 hash.Hash64 = murmur3.New64()
h64.Write([]byte(setKeyName))
retKey := hex.EncodeToString(h64.Sum(nil))

return string(h64.Sum64())
log.Debug("Input key was: ", setKeyName)
log.Debug("Hashed key is: ", retKey)
return retKey
}

func (r *RedisStorageManager) cleanKey(keyName string) string {
Expand Down

0 comments on commit 4708768

Please sign in to comment.