gocache
A data race free Go ache library with high performance and auto pruge functionality
About gocache
gocache (basic go in-memory caching)
gocache is a data race-free cache implementation in Go, providing efficient caching capabilities for your applications.
for V1 you can read this
Installation
go get -u github.com/yuseferi/gocache/v2
Usage:
cache := gocache.NewCache[string](time.Minute * 2) // with 2 minutes interval cleaning expired items
cache.Set("key", "value", time.Minute) // set cache
value, found := cache.Get("key") // retrive cache data
cache.Delete("key") // delete specific key manually
cache.Clear() // clear all cache items ( purge)
size := cache.Size() // get cache size
Contributing
We strongly believe in open-source ❤️😊. Please feel free to contribute by raising issues and submitting pull requests to make gocache even better!
Released under the GNU GENERAL PUBLIC LICENSE.
Frequently Asked Questions
What is gocache?
gocache is a Database library for the Go programming language. A data race free Go ache library with high performance and auto pruge functionality
How do I install gocache?
Install gocache with the Go module system using `go get yuseferi/gocache`. Check the repository for the current installation instructions.
What category does gocache belong to?
gocache is listed under Database, specifically Caches.