inmem

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package inmem implements a layer of services in memory using purely Go constructs. In theory, they can be swapped out for services implemented using other tech, e.g. databases, redis, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache(config CacheConfig) (*bigcache.BigCache, error)

Types

type CacheConfig

type CacheConfig struct {
	// Total capacity of cache in MB.
	Size int
	// Time-to-live for each cache entry before automatic deletion.
	TTL time.Duration
}

Jump to

Keyboard shortcuts

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