cache

package
v0.1.0-preview.4 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package cache defines the canonical descriptor for generated cache boundaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cacheable

func Cacheable() sdk.Definition

Cacheable marks a typed GET controller method or an interface-bound managed service method whose successful response may be cached under a stable name.

Spice generates deterministic key material from the validated request and keeps the cache implementation explicit through dependency injection. Errors and unauthorized responses are never cached.

// @import { Cacheable } from "github.com/spice-framework/spice/annotation/cache"
// @Cacheable(name="orders.by-id")

func CacheableHandler

func CacheableHandler(
	_ context.Context,
	invocation sdk.Invocation,
) (sdk.Result, error)

CacheableHandler contributes one named generated cache boundary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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