package constants import ( "fmt" "time" ) const ( // SystemConfigTypeString 表示字符串配置。 SystemConfigTypeString = "string" // SystemConfigTypeInt 表示整数配置。 SystemConfigTypeInt = "int" // SystemConfigTypeBool 表示布尔配置。 SystemConfigTypeBool = "bool" // SystemConfigTypeJSON 表示 JSON 配置。 SystemConfigTypeJSON = "json" // SystemConfigCacheTTL 是系统配置默认缓存时长。 SystemConfigCacheTTL = 5 * time.Minute ) // RedisSystemConfigKey 生成单个系统配置的 Redis 缓存键。 func RedisSystemConfigKey(configKey string) string { return fmt.Sprintf("system_config:value:%s", configKey) }