local

package
v0.0.0-...-1431d8c Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package local implements cache.Cache with an in-memory cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache implements the cache.Cache interface.

func New

func New(size int) (*Cache, error)

New returns a new in-memory cache of the given size.

func (*Cache) Add

func (c *Cache) Add(key string)

Add implements the cache.Cache interface.

func (*Cache) Exists

func (c *Cache) Exists(key string) bool

Exists implements the cache.Cache interface.

Jump to

Keyboard shortcuts

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