Help us shape the future of Go! Take the 2026 Go Developer Survey

cache

package
v0.0.0-...-15b5bb4 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package cache defines task-result cache contracts independent from graph checkpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Data []byte
	TTL  time.Duration
}

Item contains opaque serialized data and its TTL. A zero TTL never expires.

type Key

type Key struct {
	Namespace string
	Key       string
}

Key identifies one cached task result.

type Store

type Store interface {
	Get(ctx context.Context, keys []Key) (map[Key][]byte, error)
	Set(ctx context.Context, items map[Key]Item) error
	Clear(ctx context.Context, namespaces []string) error
}

Store is a concurrency-safe task cache.

Directories

Path Synopsis
Package memory provides an in-process task cache.
Package memory provides an in-process task cache.
Package postgres provides a durable multi-process task-result cache.
Package postgres provides a durable multi-process task-result cache.
Package sqlite provides a durable, process-safe task-result cache.
Package sqlite provides a durable, process-safe task-result cache.

Jump to

Keyboard shortcuts

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