cache

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package cache manages the local graph cache stored under ~/.supermodel/cache/. Graphs are keyed by the SHA-256 hash of the uploaded repository ZIP, matching the content-addressed scheme used by the Supermodel API.

This is a shared kernel package. It must contain no business logic. Slice packages under internal/ may import it freely.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Evict

func Evict(hash string) error

Evict removes the cached entry for hash. No-ops on cache miss.

func Get

func Get(hash string) (*api.Graph, error)

Get loads a cached graph for hash. Returns (nil, nil) on cache miss.

func HashFile

func HashFile(path string) (string, error)

HashFile returns the hex-encoded SHA-256 of the file at path.

func Put

func Put(hash string, g *api.Graph) error

Put stores g in the cache under hash.

Types

This section is empty.

Jump to

Keyboard shortcuts

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