cache

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// Get retrieves v from Backend. The returned v may be the original value. The caller should
	// not modify it.
	Get(ctx context.Context, key string) (v []byte, storedTime, expirationTime time.Time, err error)

	// Store stores a copy of v into Backend. v cannot be nil.
	// If expirationTime is already passed, Store is a noop.
	Store(ctx context.Context, key string, v []byte, storedTime, expirationTime time.Time) error

	// Closer closes the cache backend.
	io.Closer
}

Backend represents a cache backend.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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