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

Function NewDefaultPreparedCache

proxy/proxy.go:989–995  ·  view source on GitHub ↗

NewDefaultPreparedCache creates a new default prepared cache capping the max item capacity to `size`.

(size int)

Source from the content-addressed store, hash-verified

987
988// NewDefaultPreparedCache creates a new default prepared cache capping the max item capacity to `size`.
989func NewDefaultPreparedCache(size int) (proxycore.PreparedCache, error) {
990 cache, err := lru.New(size)
991 if err != nil {
992 return nil, err
993 }
994 return &defaultPreparedCache{cache}, nil
995}
996
997type defaultPreparedCache struct {
998 cache *lru.Cache

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected