MCPcopy Index your code
hub / github.com/git-bug/git-bug / RepoCache

Struct RepoCache

cache/repo_cache.go:55–73  ·  view source on GitHub ↗

RepoCache is a cache for a Repository. This cache has multiple functions: 1. After being loaded, a Bug is kept in memory in the cache, allowing for fast access later. 2. The cache maintain in memory and on disk a pre-digested excerpt for each bug, allowing for fast querying the whole set of bugs wi

Source from the content-addressed store, hash-verified

53// own usage, by writing a lock file. Of course, normal git operations are not
54// affected, only git-bug related one.
55type RepoCache struct {
56 // the underlying repo
57 repo repository.ClockedRepo
58
59 // the name of the repository, as defined in the MultiRepoCache
60 name string
61
62 // resolvers for all known entities and excerpts
63 resolvers entity.Resolvers
64
65 bugs *RepoCacheBug
66 identities *RepoCacheIdentity
67
68 subcaches []cacheMgmt
69
70 // the user identity's id, if known
71 muUserIdentity sync.RWMutex
72 userIdentityId entity.Id
73}
74
75// NewRepoCache create or open a cache on top of a raw repository.
76// The caller is expected to read all returned events before the cache is considered

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected