MCPcopy Index your code
hub / github.com/antchfx/xmlquery / CacheWithLimit

Method CacheWithLimit

cached_reader.go:41–50  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

39}
40
41func (c *cachedReader) CacheWithLimit(n int) []byte {
42 if n < 1 {
43 return nil
44 }
45 l := len(c.cache)
46 if n > l {
47 n = l
48 }
49 return c.cache[:n]
50}
51
52func (c *cachedReader) StopCaching() {
53 c.caching = false

Callers 2

parseMethod · 0.80
TestCachingFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestCachingFunction · 0.64