dbCache

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasExistCache

func HasExistCache(identify string, model string) bool

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 ProtectCommit

func ProtectCommit(identify string)

offline or other operate to force commit.

func PushCommitModels

func PushCommitModels(identify string, models ...string)

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.

func UpdateDBCache

func UpdateDBCache(identify string, model string, data []byte) bool

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
}

Jump to

Keyboard shortcuts

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