cache

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package cache impl the cache for gocq

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init 初始化 Cache

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache wraps the btree.DB for concurrent safe

var (
	Image Cache
	Video Cache
)

Media Cache DBs

func (*Cache) Delete

func (c *Cache) Delete(md5 []byte)

Delete 删除指定缓存

func (*Cache) Get

func (c *Cache) Get(md5 []byte) []byte

Get 获取缓存信息

func (*Cache) Insert

func (c *Cache) Insert(md5, data []byte)

Insert 添加媒体缓存

Jump to

Keyboard shortcuts

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