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
| 53 | // own usage, by writing a lock file. Of course, normal git operations are not |
| 54 | // affected, only git-bug related one. |
| 55 | type 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 |
nothing calls this directly
no outgoing calls
no test coverage detected