freecache

package
v1.0.0-dev.103 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

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

func New

func New(cache *freecache.Cache, options *Options) *Driver

func (*Driver) Del

func (c *Driver) Del(ctx context.Context, key string) error

func (*Driver) Get

func (c *Driver) Get(ctx context.Context, key string) (data []byte, err error)

func (*Driver) Set

func (c *Driver) Set(ctx context.Context, key string, data []byte) (err error)

type Options

type Options struct {
	TTL time.Duration `config:"ttl"`
}

Options represents cache options.

Jump to

Keyboard shortcuts

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