cache

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeOutMax        = 3600
	CheckDirtyInteval = 10
)

Variables

This section is empty.

Functions

func Exit

func Exit()

Types

type Basic

type Basic struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

type TransCache

type TransCache struct {
	Basic
	DataMap map[string]*TransData
	// contains filtered or unexported fields
}
var (
	Instance_TranslationCache *TransCache
)

func (*TransCache) Add

func (this *TransCache) Add(ID string, languageID uint32, fromLanID uint32, content string, transResult string)

func (*TransCache) Get

func (this *TransCache) Get(ID string) *TransData

func (*TransCache) GetTranslation

func (this *TransCache) GetTranslation(ID string, languageID uint32) string

type TransData

type TransData struct {
	Basic
	ID         string
	Content    string // 原文
	LanguageID uint32
	Data       map[uint32]string
	// contains filtered or unexported fields
}

func (*TransData) Get

func (this *TransData) Get(languageId uint32) string

type TranslatingCache

type TranslatingCache struct {
	Basic
	Data map[string]map[uint32]bool
}
var (
	Instance_TranslatingCache *TranslatingCache
)

func (*TranslatingCache) Add

func (this *TranslatingCache) Add(ID string, languageID uint32)

func (*TranslatingCache) Get

func (this *TranslatingCache) Get(ID string, languageID uint32) bool

func (*TranslatingCache) Remove

func (this *TranslatingCache) Remove(ID string, languageID uint32)

Jump to

Keyboard shortcuts

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