caches

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 3 Imported by: 0

README

caches

当前包在 github action 上只能跑在 linux 系统,作为独立的包,不影响其它包在所有系统上运行。

Documentation

Overview

Package caches 内置的缓存接口实现

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(v any) ([]byte, error)

Marshal 序列化对象

这是 cache.Cache 存储对象时的转换方法, 除了判断 cache.Serializer 之外,还提供了默认的编码方式。

大部分时候 cache.Driver 的实现者直接调用此方法即可, 如果需要自己实现,需要注意 cache.Serializer 接口的判断。

func Unmarshal

func Unmarshal(bs []byte, v any) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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