disable cache for now

This commit is contained in:
James Bardin 2023-07-06 10:45:57 -04:00
parent cf5ebaf685
commit 68d86e81fb
2 changed files with 18 additions and 12 deletions

View File

@ -137,13 +137,16 @@ func (p *GRPCProvider) GetProviderSchema() (resp providers.GetProviderSchemaResp
resp.ServerCapabilities.PlanDestroy = protoResp.ServerCapabilities.PlanDestroy
}
// FIXME: Waiting for a provider capability to prevent caching
// providers which always need GetProviderSchema called.
// set the global cache if we can
if !p.Addr.IsZero() {
providers.SchemaCache.Set(p.Addr, resp)
} else {
// otherwise store it in the local cache
p.schemas = resp
}
//if !p.Addr.IsZero() {
// providers.SchemaCache.Set(p.Addr, resp)
//} else {
// // otherwise store it in the local cache
// p.schemas = resp
//}
p.schemas = resp
return resp
}

View File

@ -137,13 +137,16 @@ func (p *GRPCProvider) GetProviderSchema() (resp providers.GetProviderSchemaResp
resp.ServerCapabilities.PlanDestroy = protoResp.ServerCapabilities.PlanDestroy
}
// FIXME: Waiting for a provider capability to prevent caching
// providers which always need GetProviderSchema called.
// set the global cache if we can
if !p.Addr.IsZero() {
providers.SchemaCache.Set(p.Addr, resp)
} else {
// otherwise store it in the local cache
p.schemas = resp
}
//if !p.Addr.IsZero() {
// providers.SchemaCache.Set(p.Addr, resp)
//} else {
// // otherwise store it in the local cache
// p.schemas = resp
//}
p.schemas = resp
return resp
}