Versions in this module Expand all Collapse all v1 v1.0.0 Aug 18, 2023 Changes in this version + const GormCachePrefix + var ErrCacheLoadFailed = errors.New("cache hit, but load value error") + var ErrCacheUnmarshal = errors.New("cache hit, but unmarshal error") + var PrimaryCacheHit = errors.New("primary cache hit") + var SearchCacheHit = errors.New("search cache hit") + func ContainString(target string, slice []string) bool + func GenInstanceId() string + func GenPrimaryCacheKey(instanceId string, tableName string, primaryKey string) string + func GenPrimaryCachePrefix(instanceId string, tableName string) string + func GenSearchCacheKey(instanceId string, tableName string, sql string, vars ...any) string + func GenSearchCachePrefix(instanceId string, tableName string) string + func RandFloatingInt64(v int64) int64 + func ShouldCache(tableName string, tables []string) bool + type Kv struct + Key string + Value string