aboutsummaryrefslogtreecommitdiffstats
path: root/cache/identity_cache.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-02-18 14:11:37 +0100
committerMichael Muré <batolettre@gmail.com>2019-03-01 22:40:26 +0100
commit947ea63522610bd16c32cf70812c129eda9bbb02 (patch)
tree76542e4a5ab488dc45477d33c3f4e94b0eb36975 /cache/identity_cache.go
parent976af3a4e8382d03e9f2ccb57e2ed3b783294138 (diff)
downloadgit-bug-947ea63522610bd16c32cf70812c129eda9bbb02.tar.gz
identity: wip caching
Diffstat (limited to 'cache/identity_cache.go')
-rw-r--r--cache/identity_cache.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cache/identity_cache.go b/cache/identity_cache.go
index 93b2dc4b..c49e9519 100644
--- a/cache/identity_cache.go
+++ b/cache/identity_cache.go
@@ -4,7 +4,7 @@ import (
"github.com/MichaelMure/git-bug/identity"
)
-// IdentityCache is a wrapper around an Identity. It provide multiple functions:
+// IdentityCache is a wrapper around an Identity for caching.
type IdentityCache struct {
*identity.Identity
repoCache *RepoCache
@@ -17,6 +17,10 @@ func NewIdentityCache(repoCache *RepoCache, id *identity.Identity) *IdentityCach
}
}
+func (i *IdentityCache) notifyUpdated() error {
+ return i.repoCache.identityUpdated(i.Identity.Id())
+}
+
func (i *IdentityCache) Commit() error {
return i.Identity.Commit(i.repoCache.repo)
}