Categorygithub.com/c3mb0/niftycache
modulepackage
1.0.14
Repository: https://github.com/c3mb0/niftycache.git
Documentation: pkg.go.dev

# README

niftycache

cb := func(k string, v interface{}) {
	fmt.Printf("key: %s | value: %+v\n", k, v)
}

cache := niftycache.New(10*time.Minute,
	niftycache.ExpireCallback(cb),
	niftycache.RemoveCallback(cb),
	niftycache.SetCallback(cb),
	// controls whether a successful cache hit extends the item's ttl (default false)
	niftycache.ExtendTTLOnHit(),
	// controls the max amount of items that can be expired at once (default 10000)
	niftycache.MaxExpires(10000),
	// controls the max amount of concurrent callbacks that can be fired (default 1000)
	niftycache.MaxCallbacks(1000),
)

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author