cache

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Overview

Package cache defines the interface for a key-based data store.

This package is designated as private and is intended for use only by the smithy client runtime. The exported API therein is not considered stable and is subject to breaking changes without notice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	// Retrieve the value associated with the given key. The returned boolean
	// indicates whether the cache held a value for the given key.
	Get(k interface{}) (interface{}, bool)

	// Store a value under the given key.
	Put(k interface{}, v interface{})
}

Cache defines the interface for an opaquely-typed, key-based data store.

The thread-safety of this interface is undefined and is dictated by implementations.

Directories

Path Synopsis
Package lru implements [cache.Cache] with an LRU eviction policy.
Package lru implements [cache.Cache] with an LRU eviction policy.

Jump to

Keyboard shortcuts

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