MCPcopy Create free account
hub / github.com/antchfx/xpath / defaultRegexpCache

Function defaultRegexpCache

cache.go:67–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65)
66
67func defaultRegexpCache() *loadingCache {
68 return NewLoadingCache(
69 func(key interface{}) (interface{}, error) {
70 return regexp.Compile(key.(string))
71 }, defaultCap)
72}
73
74func getRegexp(pattern string) (*regexp.Regexp, error) {
75 exp, err := RegexpCache.get(pattern)

Callers 2

cache.goFile · 0.85
TestGetRegexpFunction · 0.85

Calls 1

NewLoadingCacheFunction · 0.85

Tested by 1

TestGetRegexpFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…