This commit is contained in:
Alex Shevchuk
2025-08-18 17:12:04 +03:00
commit d84487d238
157 changed files with 160686 additions and 0 deletions

16
internal/cache/client.go vendored Normal file
View 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)
}