Documentation ¶
Index ¶
- func HasExistCache(identify string, model string) bool
- func InitDBCache(dbProvider *service.TDBProvider)
- func PopCommitModels(identify string)
- func ProtectCommit(identify string)
- func PushCommitModels(identify string, models ...string)
- func UpdateDBCache(identify string, model string, data []byte) bool
- type TDBCache
- type TModelOper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasExistCache ¶
check model is exist, if not then flush db direct.
func InitDBCache ¶
func InitDBCache(dbProvider *service.TDBProvider)
func PopCommitModels ¶
func PopCommitModels(identify string)
first commit all update, then pop all push models.
func PushCommitModels ¶
push model for db cache, record flush db times, at next flush db, then judge last flush or not, if yes then get data from cache.
Types ¶
type TDBCache ¶
type TDBCache struct {
// contains filtered or unexported fields
}
func GetDBCache ¶
func GetDBCache() *TDBCache
type TModelOper ¶
type TModelOper struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.