MCPcopy Create free account
hub / github.com/datastax/cql-proxy / getOrCreateDefaultPreparedCache

Function getOrCreateDefaultPreparedCache

proxy/proxy.go:981–986  ·  view source on GitHub ↗
(cache proxycore.PreparedCache)

Source from the content-addressed store, hash-verified

979}
980
981func getOrCreateDefaultPreparedCache(cache proxycore.PreparedCache) (proxycore.PreparedCache, error) {
982 if cache == nil {
983 return NewDefaultPreparedCache(1e8 / 256) // ~100MB with an average query size of 256 bytes
984 }
985 return cache, nil
986}
987
988// NewDefaultPreparedCache creates a new default prepared cache capping the max item capacity to `size`.
989func NewDefaultPreparedCache(size int) (proxycore.PreparedCache, error) {

Callers 1

ConnectMethod · 0.85

Calls 1

NewDefaultPreparedCacheFunction · 0.85

Tested by

no test coverage detected