cache

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package cache provide abstractions for concrete cache implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(key string) (interface{}, bool, error)
	Purge() error
	Remove(key string) error
	Set(key string, value interface{}) error
}

Cache interface.

type TTLCache

type TTLCache interface {
	Cache
	SetTTL(key string, value interface{}, ttl time.Duration) error
}

TTLCache interface adds support for expiring key-value pairs.

Directories

Path Synopsis
Package lru is the concrete implementation of the cache abstraction.
Package lru is the concrete implementation of the cache abstraction.
Package redis is the concrete implementation of the cache abstraction.
Package redis is the concrete implementation of the cache abstraction.

Jump to

Keyboard shortcuts

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