cache

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package cache provides a reserve.Store decorator that caches point-in-time reserve lookups in front of a wrapped store.

Point-in-time reads are keyed by mint and a coarse time bucket that doubles as the freshness window. Range and live reads pass straight through. Live writes are guarded against the last successfully saved slot per mint: a write whose slot is not greater is rejected with currency.ErrStaleReserveState without a round-trip to the backing store. Everything else passes straight through.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(backing reserve.Store) reserve.Store

New returns a reserve.Store that caches reads in front of backing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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