Categorygithub.com/go-playground/cache
module
0.13.0
Repository: https://github.com/go-playground/cache.git
Documentation: pkg.go.dev

# README

cache

Project status GoDoc License

Contains multiple in-memory cache implementations including LRU & LFU

Requirements

  • Go 1.18+

Contents

Visit linked cache README's via the links below for more details.

CacheDescription
LRUA Least recently Used cache.
LFUA Lead Frequently Used cache.

Thread Safety

These caches have the option of being built with no locking, allowing fine grained control of locking scemantics for the caller, and an auto locking option, for when fine grained control is not required.

When to control your own locking scemantics:

  • No additional overhead if not needed.
  • If one or more operations are desired to be done at once, which allows caller/locker/user to choose the locking strategy that best suits them. eg. can lock and do two gets and a set before unlocking.

When to use auto locking:

  • When only one operation will ever be done at once eg. Get, Set, Remove, ...

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
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.

# Packages

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