From 68d86e81fb3e32e6a2ba451e550164a41a6e4802 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Thu, 6 Jul 2023 10:45:57 -0400 Subject: [PATCH] disable cache for now --- internal/plugin/grpc_provider.go | 15 +++++++++------ internal/plugin6/grpc_provider.go | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/internal/plugin/grpc_provider.go b/internal/plugin/grpc_provider.go index d3e7632555..c1b9a1af07 100644 --- a/internal/plugin/grpc_provider.go +++ b/internal/plugin/grpc_provider.go @@ -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 } diff --git a/internal/plugin6/grpc_provider.go b/internal/plugin6/grpc_provider.go index 351226d632..c4888d709c 100644 --- a/internal/plugin6/grpc_provider.go +++ b/internal/plugin6/grpc_provider.go @@ -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 }