cache

package
v0.1.0-preview.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 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 GET controller method whose successful response may be cached under a stable cache 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