An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 9.2% on proxy.golang.org

proxy.golang.org : github.com/go-pkgz/expirable-cache/v3

Package cache implements Cache similar to hashicorp/golang-lru Support LRC, LRU and TTL-based eviction. Package is thread-safe and doesn't spawn any goroutines. On every Set() call, cache deletes single oldest entry in case it's expired. In case MaxSize is set, cache deletes the oldest entry disregarding its expiration date to maintain the size, either using LRC or LRU eviction. In case of default TTL (10 years) and default MaxSize (0, unlimited) the cache will be truly unlimited and will never delete entries from itself automatically. Important: only reliable way of not having expired entries stuck in a cache is to run cache.DeleteExpired periodically using time.Ticker, advisable period is 1/2 of TTL.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/go-pkgz/expirable-cache/v3
Keywords: cache , expirable-cache , go , go-library , lrc-cache , lru-cache
License: MIT
Latest release: over 1 year ago
First release: over 1 year ago
Namespace: github.com/go-pkgz/expirable-cache
Stars: 67 on GitHub
Forks: 9 on GitHub
Total Commits: 9
Committers: 3
Average commits per author: 3.0
Development Distribution Score (DDS): 0.333
More commit stats: commits.ecosyste.ms
See more repository details: repos.ecosyste.ms
Funding links: https://github.com/sponsors/umputun
Last synced: 11 days ago

    Loading...
    Readme
    Loading...