diff --git a/go.mod b/go.mod index 496533ebcc..048a971f18 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,6 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/coder/websocket v1.8.12 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc - github.com/dgraph-io/ristretto/v2 v2.0.0 github.com/fatih/color v1.18.0 github.com/go-playground/locales v0.14.1 github.com/go-playground/universal-translator v0.18.1 @@ -221,6 +220,7 @@ require ( github.com/coreos/go-semver v0.3.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/creack/pty v1.1.18 // indirect + github.com/dgraph-io/ristretto/v2 v2.0.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/disintegration/imaging v1.6.2 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect 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) }