cache

package
v0.0.0-...-ec7abc8 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package cache implements an LRU cache and a redis cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLRUCache

func NewLRUCache(maxEntries int, ttl time.Duration) base.Cache

NewLRUCache creates a new Cache. If maxEntries is zero, the cache has no limit and it's assumed that eviction is done by the caller.

func NewRedisCache

func NewRedisCache(ttl time.Duration, client redis.UniversalClient) base.Cache

NewRedisCache creates a new cache.

Types

This section is empty.

Jump to

Keyboard shortcuts

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