cache

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(ctx context.Context, key string) (string, error)
	Set(ctx context.Context, key string, value string, expiration time.Duration) error
	Delete(ctx context.Context, key string) error
}

type Memcache

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

func NewMemcache

func NewMemcache(defaultExpiration, cleanupInterval time.Duration) *Memcache

func (*Memcache) Delete

func (g *Memcache) Delete(ctx context.Context, key string) error

func (*Memcache) Get

func (g *Memcache) Get(ctx context.Context, key string) (string, error)

func (*Memcache) Set

func (g *Memcache) Set(ctx context.Context, key string, value string, expiration time.Duration) error

Jump to

Keyboard shortcuts

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