Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdapter ¶
func NewAdapter(opts ...AdapterOptions) (cache.Adapter, error)
NewAdapter initializes memory adapter.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter is the memory adapter data structure.
type AdapterOptions ¶
AdapterOptions is used to set Adapter settings.
func AdapterWithAlgorithm ¶
func AdapterWithAlgorithm(alg Algorithm) AdapterOptions
AdapterWithAlgorithm sets the approach used to select a cached response to be evicted when the capacity is reached.
func AdapterWithCapacity ¶
func AdapterWithCapacity(cap int) AdapterOptions
AdapterWithCapacity sets the maximum number of cached responses.
func AdapterWithStorageCapacity ¶
func AdapterWithStorageCapacity(cap int) AdapterOptions
AdapterWithStorageCapacity sets the maximum number of cached bytes
Click to show internal directories.
Click to hide internal directories.