1
This commit is contained in:
16
internal/cache/client.go
vendored
Normal file
16
internal/cache/client.go
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
package cache
|
||||
|
||||
import "fmt"
|
||||
|
||||
func New(c Config, t Type) (Client, error) {
|
||||
switch t {
|
||||
case ValkeyCacheType:
|
||||
return newValKeyCache(c)
|
||||
default:
|
||||
return nil, ErrUnknownCacheType
|
||||
}
|
||||
}
|
||||
|
||||
func getKey(k string, t ValueType) string {
|
||||
return fmt.Sprintf("%s:%s", t, k)
|
||||
}
|
Reference in New Issue
Block a user