MCPcopy
hub / github.com/crowdsecurity/crowdsec / XMLCacheInit

Function XMLCacheInit

pkg/exprhelpers/xml.go:62–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60}
61
62func XMLCacheInit() {
63 gc := gcache.New(50)
64 // Short cache expiration because we each line we read is different, but we can call multiple times XML helpers on each of them
65 gc.Expiration(5 * time.Second)
66 gc = gc.LRU()
67
68 xmlDocumentCache = gc.Build()
69}
70
71// func XMLGetAttributeValue(xmlString string, path string, attributeName string) string {
72func XMLGetAttributeValue(params ...any) (any, error) {

Callers 1

InitFunction · 0.85

Calls 1

BuildMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…