util

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GormCachePrefix = "chcache"
	GormCacheTTL    = "gorm:" + GormCachePrefix + ":iscache"
)

Variables

View Source
var SearchCacheHit = errors.New("search cache hit1")

Functions

func GenInstanceId

func GenInstanceId() string

func GenSearchCacheKey

func GenSearchCacheKey(instanceId string, tableName string, sql string, vars ...interface{}) string

func GetTTL

func GetTTL(ttlInstance interface{}) int64

func RandFloatingInt64

func RandFloatingInt64(v int64) int64

Types

type Kv

type Kv struct {
	Key   string
	Value string
	TTL   int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL