memory

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package memory stores trend data in an in-memory cache.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ttl time.Duration, opts ...Option) (trend.Store, error)

New creates an in-memory store.

func Open

func Open(u *url.URL) (trend.Store, error)

Open opens an in-memory store. The optional ttl and size queries set entry lifetime and size in megabytes.

Types

type Option added in v0.3.0

type Option func(*bigcache.Config)

Option configures an in-memory store.

func WithCacheSize added in v0.3.0

func WithCacheSize(size int) Option

WithCacheSize sets the cache size limit in megabytes. Zero means unlimited.

Jump to

Keyboard shortcuts

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