Registry / utility / allegro-bigcache-v2

allegro-bigcache-v2

JSON →
library2.2.5gogounverified

Fast, concurrent, in-memory cache for large numbers of entries.

go get github.com/allegro/bigcache/v2
INSTALL
IMPORT
SIG · ALLEGRO-BIGCACHE-V
A
allegro-bigcache-v2
utilitygov2.2.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

bigcache
github.com/allegro/bigcache/v2

Create a BigCache instance, set a key-value pair, and retrieve it.

package main import ( "fmt" "github.com/allegro/bigcache/v2" ) func main() { cache, _ := bigcache.NewBigCache(bigcache.DefaultConfig(10 * time.Minute)) cache.Set("key", []byte("value")) entry, _ := cache.Get("key") fmt.Println(string(entry)) }
Debug
Known issues
gotchaDefaultConfig uses a 10-minute default life window; entries may be evicted sooner if the cache is full.
fix
Adjust CleanWindow and MaxEntrySize in config to match your use case.
affects: >=2.0.0
Upgrade
Version history
2.2.5latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
22
Meta
1
Amazon
1
OpenAI (training)
1
Resources
allegro-bigcache-v2 — go get allegro-bigcache-v2 · libregistry