From da54c1e6dd80ffc564467283f91dbca5b8fba0e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Tou=C5=A1ek?= Date: Thu, 19 Dec 2024 11:51:05 +0100 Subject: [PATCH] debug: Disable cache --- .../type/tablesink/keboola/bridge/bridge.go | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/internal/pkg/service/stream/sink/type/tablesink/keboola/bridge/bridge.go b/internal/pkg/service/stream/sink/type/tablesink/keboola/bridge/bridge.go index 07983a5b3b..7282f0bbf7 100644 --- a/internal/pkg/service/stream/sink/type/tablesink/keboola/bridge/bridge.go +++ b/internal/pkg/service/stream/sink/type/tablesink/keboola/bridge/bridge.go @@ -3,9 +3,7 @@ package bridge import ( "context" "sync" - "time" - "github.com/dgraph-io/ristretto/v2" "github.com/keboola/go-client/pkg/keboola" "github.com/keboola/go-cloud-encrypt/pkg/cloudencrypt" etcd "go.etcd.io/etcd/client/v3" @@ -83,18 +81,18 @@ func New(d dependencies, apiProvider apiProvider, config keboolasink.Config) (*B encryptor := d.Encryptor() if encryptor != nil { - cache, err := ristretto.NewCache( - &ristretto.Config[[]byte, []byte]{ - NumCounters: 1e6, - MaxCost: 1 << 20, - BufferItems: 64, - }, - ) - if err != nil { - return nil, err - } - - encryptor = cloudencrypt.NewCachedEncryptor(encryptor, time.Hour, cache) + //cache, err := ristretto.NewCache( + // &ristretto.Config[[]byte, []byte]{ + // NumCounters: 1e6, + // MaxCost: 1 << 20, + // BufferItems: 64, + // }, + //) + //if err != nil { + // return nil, err + //} + + //encryptor = cloudencrypt.NewCachedEncryptor(encryptor, time.Hour, cache) tokenEncryptor = cloudencrypt.NewGenericEncryptor[keboola.Token](encryptor) credentialsEncryptor = cloudencrypt.NewGenericEncryptor[keboola.FileUploadCredentials](encryptor) }