Merge pull request #384 from paivagustavo/invalidate-cache-when-changing-context

invalidate cache when switching context
mine
Fernand Galiana 2019-10-25 10:05:58 -06:00 committed by GitHub
commit acd7702cdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -332,6 +332,7 @@ func (a *APIClient) SwitchContextOrDie(ctx string) {
} }
if currentCtx != ctx { if currentCtx != ctx {
a.cachedDiscovery = nil
a.reset() a.reset()
if err := a.config.SwitchContext(ctx); err != nil { if err := a.config.SwitchContext(ctx); err != nil {
panic(err) panic(err)