Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions fix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package fix

import (
"crypto/sha256"
"fmt"
)

// FixCacheKeyCollision generates unique cache keys using SHA256 hashing
// to prevent collisions during tenant shuffle operations.
func GenerateCacheKey(tenantID string, resourceID string) string {
h := sha256.New()
h.Write([]byte(fmt.Sprintf("%s:%s", tenantID, resourceID)))
return fmt.Sprintf("%x", h.Sum(nil))
}