cache

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//TagCache tag's cache key=>tag_id, value=>*tag.Meta
	TagCache = make(map[int64]*tag.Meta)
)
View Source
var (
	//VideoUpTypeCache cache for video types, map key is tid
	VideoUpTypeCache = make(map[int]archive.Type)
)

Functions

func AddTagCache

func AddTagCache(meta *tag.Meta)

AddTagCache add tag cache

func ClearTagCache

func ClearTagCache(tm time.Time)

ClearTagCache clear all tag cache

func GetTagCache

func GetTagCache(ids ...int64) (result map[int64]*tag.Meta, leftIDs []int64)

GetTagCache get tag cache

func GetTidName

func GetTidName(tid int64) string

GetTidName get tid name

func GetTidNames

func GetTidNames(tids []int64) (tpNames map[int64]string)

GetTidNames get tid name

func LoadCache

func LoadCache()

LoadCache load cache

func RefreshUpType

func RefreshUpType(tm time.Time)

RefreshUpType refresh

func RefreshUpTypeAsync

func RefreshUpTypeAsync(tm time.Time)

RefreshUpTypeAsync refresh in a goroutine

Types

This section is empty.

Jump to

Keyboard shortcuts

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