cacher

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package cacher provides implementation of cache type definition

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache added in v1.7.0

type Cache[V any] interface {
	Start(context.Context)
	Get(string) (V, bool)
	Set(string, V)
	Delete(string)
	GetAndDelete(string) (V, bool)
}

Cache represent the cache interface to store cache.

type Type

type Type uint8

Type represents the cacher type. Currently it support GACHE only.

const (
	Unknown Type = iota
	GACHE
)

func ToType

func ToType(str string) Type

ToType returns the type based on the string.

func (Type) String

func (m Type) String() string

String returns the type name.

Jump to

Keyboard shortcuts

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