cache

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CACHE_ROOT_PATH = run.CACHE_ROOT_PATH
View Source
var CACHE_RUN_PATH = run.CACHE_RUN_PATH
View Source
var CACHE_STAT_DIR_PATH = run.CACHE_STAT_DIR_PATH
View Source
var CACHE_WORDS_PATH = run.CACHE_WORDS_PATH
View Source
var DB_FILENAME = "kd_data.db"
View Source
var LONG_TEXT_CACHE_FILE string
View Source
var LiteDB *sql.DB

Functions

func AppendNotFound

func AppendNotFound(query string) (err error)

func CheckNotFound

func CheckNotFound(query string) (int, error)

func CounterIncr

func CounterIncr(query string, history chan int)

func GetCachedQuery

func GetCachedQuery(r *model.Result) (err error)

func GetCachedQueryFromJson

func GetCachedQueryFromJson(r *model.Result) (err error)

func GetLongTextCache added in v0.0.7

func GetLongTextCache(r *model.Result) (err error)

func InitDB

func InitDB() error

func RemoveNotFound

func RemoveNotFound(query string) error

func UpdateLongTextCache added in v0.0.7

func UpdateLongTextCache(r *model.Result) (err error)

func UpdateQueryCache

func UpdateQueryCache(r *model.Result) (err error)

func UpdateQueryCacheJson

func UpdateQueryCacheJson(r *model.Result) (err error)

Types

type LongTextData added in v0.0.7

type LongTextData struct {
	Result   string `json:"r"`
	AccessTS int64  `json:"a"`
	CreateTS int64  `json:"c"`
}

type MonthCounter

type MonthCounter map[string]int

Jump to

Keyboard shortcuts

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