cache

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 2 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) ([]byte, error)
	GetBool(ctx context.Context, key string) (bool, error)
	GetFloat(ctx context.Context, key string) (float64, error)
	GetInt(ctx context.Context, key string) (int64, error)
	GetString(ctx context.Context, key string) (string, error)
	GetObject(ctx context.Context, key string, obj interface{}) error

	Set(ctx context.Context, key string, val interface{}, expiration time.Duration) error

	Delete(ctx context.Context, key string) error

	Exists(ctx context.Context, key string) bool
	RemainingTime(ctx context.Context, key string) time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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