MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / newKeywordSuggestionCache

Function newKeywordSuggestionCache

pkg/errors/cache.go:43–48  ·  view source on GitHub ↗

newKeywordSuggestionCache creates a new cache with the given max size

(maxSize int)

Source from the content-addressed store, hash-verified

41
42// newKeywordSuggestionCache creates a new cache with the given max size
43func newKeywordSuggestionCache(maxSize int) *keywordSuggestionCache {
44 return &keywordSuggestionCache{
45 cache: make(map[string]string),
46 maxSize: maxSize,
47 }
48}
49
50// get retrieves a cached suggestion if available
51func (c *keywordSuggestionCache) get(input string) (string, bool) {

Callers 2

cache.goFile · 0.85

Calls

no outgoing calls

Tested by 1