INNER CODE UNIT · Go

newSettings

go-graphite/go-carbon · cache/cache.go:132

	newSettings := *s
	newSettings.maxSize = int64(maxSize)
	c.settings.Store(&newSettings)
}

// SetBloomSize of bloom filter
func (c *Cache) SetBloomSize(bloomSize uint64) {
	if bloomSize > 0 {
		c.newMetricCf = blobloom.NewOptimized(blobloom.Config{
			Capacity: bloomSize, // Expected number of keys.
			FPRate:   1e-4,      // Accept one false positive per 10,000 lookups.
		})
		c.newMetricCfCapacity = bloomSize
	}
}

func (c *Cache) SetTagsEnabled(value bool) {
	s := c.settings.Load().(*cacheSettings)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…