aboutsummaryrefslogtreecommitdiffstats
path: root/cache/cache.go
diff options
context:
space:
mode:
Diffstat (limited to 'cache/cache.go')
-rw-r--r--cache/cache.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cache/cache.go b/cache/cache.go
index c440646e..779b95b0 100644
--- a/cache/cache.go
+++ b/cache/cache.go
@@ -27,7 +27,7 @@ type RepoCacher interface {
}
type BugCacher interface {
- Snapshot() bug.Snapshot
+ Snapshot() *bug.Snapshot
ClearSnapshot()
}
@@ -37,8 +37,8 @@ type RootCache struct {
repos map[string]RepoCacher
}
-func NewCache() Cacher {
- return &RootCache{
+func NewCache() RootCache {
+ return RootCache{
repos: make(map[string]RepoCacher),
}
}
@@ -172,12 +172,12 @@ func NewBugCache(b *bug.Bug) BugCacher {
}
}
-func (c BugCache) Snapshot() bug.Snapshot {
+func (c BugCache) Snapshot() *bug.Snapshot {
if c.snap == nil {
snap := c.bug.Compile()
c.snap = &snap
}
- return *c.snap
+ return c.snap
}
func (c BugCache) ClearSnapshot() {