Skip to main content

Module cache_search

Module cache_search 

Source
Expand description

The workspace search’s hosting kinds: pull/merge requests and issues found in a repository’s on-disk hosting cache (hosting-cache.json, the snapshot the TUI keeps beside repo-state.toml), never from a host.

The cache is the TUI’s file and the search is read-only over it, so this reads a deliberately small, lenient mirror of the snapshot (only what is searched; every other field is ignored) instead of the TUI’s own type: a cache written by another version, rewritten while it is read, or truncated is “no hits”, never an error. Always compiled (no hosting feature): without one, no cache exists and nothing is found.

Structs§

CachedItem
One cached request or issue, reduced to what is searched.
CachedItems
What a repository’s cache holds.

Functions§

load
The cache at path; missing, unreadable, corrupt or half-written is empty.
search
The best limit requests and issues of items for text (a query with its prefix already removed), restricted to kinds (only the hosting kinds count; empty = both). Best first, then by number, newest first.