Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make render.ResetCache() reset all caches #2949

Merged
merged 1 commit into from
Nov 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions render/memoise.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
7 changes: 7 additions & 0 deletions render/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}