hcache

package
v0.0.0-...-81a76de Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelCache

func DelCache(bucket string, key []byte) (err error)

DelCache 删除缓存数据

func GetCache

func GetCache(bucket string, key []byte) (entry *nutsdb.Entry, err error)

GetCache 获取缓存数据

func GetInitNutsDbGlobalPath

func GetInitNutsDbGlobalPath() (string, error)

GetInitNutsDbGlobalPath 获取NutsDb数据库安装路径,当且仅当数据库实例化才可获取安装路径

func GetNutsDbCacheBean

func GetNutsDbCacheBean() (*nutsdb.DB, error)

GetNutsDbCacheBean 获取实例化单例缓存对象

func InitSetNutsDbGlobalPath

func InitSetNutsDbGlobalPath(dir string) error

InitSetNutsDbGlobalPath 初始化NutsDb数据库安装路径,仅初始化一次,默认安装位置:/tmp/hcache/nutsdb/.cache/db,建议:在init方法下初始化NutsDb安装路径

func ScanByKeyPrefix

func ScanByKeyPrefix(bucket string, keyPrefix string, offset int, rows int) (entries nutsdb.Entries, off int, err error)

ScanByKeyPrefix 前缀扫描缓存

func SetCache

func SetCache(bucket string, key []byte, value []byte, ttl uint32) error

SetCache 添加或更新缓存数据

Types

This section is empty.

Jump to

Keyboard shortcuts

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