cache

package
v0.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package cache provides a simple ttl-based item cache

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	// Insert the string k
	Insert(k string)
	// Exists proves the existence or lack-thereof of the item k in the cache
	Exists(k string) (exists bool)
}

Cache provides a simple item store

func NewCacheWithTTL

func NewCacheWithTTL(t time.Duration) Cache

NewCacheWithTTL creates a new cache with ttl of t

Jump to

Keyboard shortcuts

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