Merge pull request #2949 from weaveworks/reset-all-caches

make render.ResetCache() reset all caches
This commit is contained in:
Matthias Radestock
2017-11-22 23:32:39 +00:00
committed by GitHub
2 changed files with 7 additions and 5 deletions

View File

@@ -75,8 +75,3 @@ func (p *promise) Get() Nodes {
<-p.done
return p.val
}
// ResetCache blows away the rendered node cache.
func ResetCache() {
renderCache.Purge()
}

View File

@@ -225,3 +225,10 @@ func (ret *joinResults) copyUnmatched(input Nodes) {
func (ret *joinResults) result() Nodes {
return Nodes{Nodes: ret.nodes}
}
// ResetCache blows away the rendered node cache, and known service
// cache.
func ResetCache() {
renderCache.Purge()
knownServiceCache.Purge()
}