Contains multiple in-memory cache implementations including LRU & LFU
- Go 1.18+
See detailed usage and docs using the links below.
Cache | Description |
---|---|
LRU | A Least Recently Used cache. |
LFU | A Least Frequently Used cache. |
These caches have the option of being built with no locking and auto locking guarded via a mutex.
When to use the no locking option:
- For single threaded code.
- When you wish control your own locking semantics.
When to use auto locking:
- Ease of use, but still the ability to perform multiple operations using the LockGuard.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this package by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.