wuiilcache

package module
v0.0.0-...-1f94024 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: MIT Imports: 5 Imported by: 0

README

wuiilcache

cache

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deal

func Deal(c *gin.Context)

func REngine

func REngine(r *gin.Engine)

Types

type ByteView

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

func (ByteView) ByteSlice

func (b ByteView) ByteSlice() []byte

func (ByteView) Len

func (b ByteView) Len() int

func (ByteView) String

func (b ByteView) String() string

type Getter

type Getter interface {
	Get(key string) ([]byte, error)
}

A Getter loads data for a key.

type GetterFunc

type GetterFunc func(key string) ([]byte, error)

A GetterFunc implements Getter with a function.

func (GetterFunc) Get

func (f GetterFunc) Get(key string) ([]byte, error)

Get implements Getter interface function

type Group

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

A Group is a cache namespace and associated data loaded spread over

func GetGroup

func GetGroup(name string) *Group

GetGroup returns the named group previously created with NewGroup, or nil if there's no such group.

func NewGroup

func NewGroup(name string, cacheBytes int64, getter Getter) *Group

NewGroup create a new instance of Group

func (*Group) Get

func (g *Group) Get(key string) (ByteView, error)

Get value for a key from cache

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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