Documentation
¶
Index ¶
- func CheckCache(userid string) error
- func CheckCacheSQL(session *xorm.Session, userid string, v *Result) (err error)
- func CheckIsCanClearHistorCache(enterpriseID string, dbIndex int) bool
- func ClearHistoryVerCache(enterpriseID string, beginClearCacheVer int) bool
- func DelCache(key string) bool
- func GetCacheVerID(enterpriseID string) (dbIndex int, cacheVer int)
- func GetHashMap(key string) map[string]string
- func GetLanguageText(sourceObjID string, languageCode string, sourceDetailID string) (result string)
- func GetList(key string) []string
- func GetListMap(key string) []map[string]string
- func GetString(key string) string
- func LoadRedisCache(userid string) (err error)
- func SetString(key, val string) bool
- func SetStringExpire(key, val string, timeout int) (b bool)
- func UpdateFlagTheRuning()
- type Result
- type StrCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCache ¶
func CheckCacheSQL ¶
检查缓存SQL ,避免刷新后造成缓存异常, 例如:发布后,但数据库未更新表结构,刷新缓存! 造成部门缓存全部失效! 造成生成快捷付款单据生成时付款单异常,数据混乱 且恢复困难 !
func CheckIsCanClearHistorCache ¶
根据时间检查是否可以清除历史缓存
func ClearHistoryVerCache ¶
清除历史版本失效缓存 异步清除某企业1小时以前的历史缓存 beginClearCacheVer 表示开始清除的版本号 需要用当前版本减1
func GetLanguageText ¶
func SetStringExpire ¶
SetStringExpire 设置String对象 timeout :time.Second 秒
func UpdateFlagTheRuning ¶
func UpdateFlagTheRuning()
Types ¶
type StrCache ¶
type StrCache struct { DBname string `xml:"DBname,attr"` Name string `xml:"Name,attr"` Type string `xml:"Type,attr"` KeyField string `xml:"KeyField,attr"` GroupField string `xml:"GroupField,attr"` HashKeyPreName string `xml:"HashKeyPreName,attr"` Memo string `xml:"Memo,attr"` QuerySql string `xml:"QuerySql"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.