cacheutil

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.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 CacheItem

type CacheItem[T any] struct {
	Value      T
	Expiration *time.Timer
}

type CountdownCache

type CountdownCache[T any] struct {
	// contains filtered or unexported fields
}

func NewCountdownCache

func NewCountdownCache[T any](ttl time.Duration) *CountdownCache[T]

func (*CountdownCache[T]) Delete

func (c *CountdownCache[T]) Delete(key string)

func (*CountdownCache[T]) Get

func (c *CountdownCache[T]) Get(key string) (T, bool)

func (*CountdownCache[T]) Set

func (c *CountdownCache[T]) Set(key string, value T)

Jump to

Keyboard shortcuts

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