mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 02:00:31 +08:00
desktop: Keep the repo list and release counts in the cache
The repo list had its own TTL cache, a counter bumped by seeding and a listener of its own, and release counts were fetched separately by the sidebar and the releases page. Now they're queries like the rest, and seeding invalidates the list like any other write. The head a loader resolved is marked through `markLoading` too, so it needs no key of its own.
This commit is contained in:
@@ -12,22 +12,6 @@ export const keys = {
|
||||
// The commit a revision resolves to; no revision means the default branch.
|
||||
head: (rid: string, peer: string | undefined, revision: string | undefined) =>
|
||||
["repo", rid, "code", "head", peer ?? "", revision ?? ""] as const,
|
||||
// When a route last resolved that revision, so that a ref update during the
|
||||
// load can tell the view to check the head again.
|
||||
headLoaded: (
|
||||
rid: string,
|
||||
peer: string | undefined,
|
||||
revision: string | undefined,
|
||||
) =>
|
||||
[
|
||||
"repo",
|
||||
rid,
|
||||
"code",
|
||||
"head",
|
||||
peer ?? "",
|
||||
revision ?? "",
|
||||
"loaded",
|
||||
] as const,
|
||||
issues: (rid: string) => ["repo", rid, "issues"] as const,
|
||||
// One status's list; `status` is the filter as the view names it.
|
||||
issueList: (rid: string, status: string) =>
|
||||
|
||||
Reference in New Issue
Block a user