cache

package
v0.0.0-...-a8f546d Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: AGPL-3.0 Imports: 5 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 PathExists

func PathExists(path string) bool

Types

type Cache

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

Cache wraps the btree.DB for concurrent safe

func Init

func Init(file string) (cache *Cache)

Init 初始化 Cache

func (*Cache) Close

func (c *Cache) Close() error

func (*Cache) Delete

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

Delete 删除指定缓存

func (*Cache) Foreach

func (c *Cache) Foreach(iter func(key [16]byte, value []byte))

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