Cache channel listings for search
Search keeps each channel's list for an hour, so a repeat needs no network, and uses the old copy with a warning if the registry fails. `--refresh` skips the cache; publish, index, login and logout drop it. A test command no longer writes to stdout, where it could corrupt the test runner's results. Planning: bnbr1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8f202290b9
commit
47a80fad04
9 files changed
+330
-55
No files matched your search
@@ -0,0 +1,20 @@
|
||||
---
|
||||
data:
|
||||
priority: normal
|
||||
status: done
|
||||
tags:
|
||||
- search
|
||||
type: feature
|
||||
id: bnbr1
|
||||
title: Cache channel indexes for fast search
|
||||
---
|
||||
`orbit search` reads every channel over the network each time (about 8 s for two channels).
|
||||
|
||||
Acceptance criteria:
|
||||
|
||||
- A repeated search of the configured channels needs no network, for channels with an index and for small ones listed from the catalog.
|
||||
- A copy older than an hour is fetched again; if that fails, it is used with a warning.
|
||||
- `orbit search --refresh` skips the cache. Publishing, indexing, login and logout drop it.
|
||||
- Installs and version lookups still never read it.
|
||||
|
||||
Outcome: copies live in `<root>/cache/indexes/` (`src/main/index_cache.mbt`). A repeated search takes 3 ms instead of about 12 s. Channels with over 100 repositories and no index are not cached.
|
||||
Reference in new issue
Block a user