Skip to content

Commit

Permalink
fix(cache): Adding missing file
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Nov 13, 2021
1 parent 646e93d commit 8bf6da6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/ketchup/cache.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package ketchup

import (
"fmt"

"github.com/ViBiOh/ketchup/pkg/model"
)

func suggestCacheKey(user model.User) string {
if user.IsZero() {
return "ketchup:suggests"
}
return fmt.Sprintf("ketchup:user:%d:suggests", user.ID)
}

0 comments on commit 8bf6da6

Please sign in to comment.