• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

go-pkgz / expirable-cache
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v3.1.1
DEFAULT BRANCH: master
Repo Added 12 May 2020 12:41AM UTC
Token Cpf6khbZz7kxcUNpVAl3ukP2SnQhbD108 regen
Build 221 Last
Files 2
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH refs/tags/v3.1.1
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • fix-CVE-2019-11254
  • fix-ci-caching
  • fix-values-race-and-docs
  • generics
  • master
  • paskal/add_benchmarks
  • paskal/benchmarks
  • paskal/bump_ci
  • paskal/ci
  • paskal/get_expiration
  • paskal/modernise
  • paskal/new-options
  • paskal/simplelru_comparison
  • paskal/simplelru_compatibility
  • paskal/update_modules
  • paskal/v2_by_v3
  • perf
  • refs/tags/v0.0.1
  • refs/tags/v0.0.2
  • refs/tags/v0.0.3
  • refs/tags/v0.1.0
  • refs/tags/v1.0.0
  • refs/tags/v2.0.0
  • refs/tags/v3.0.0
  • refs/tags/v3.1.0
  • refs/tags/v3.1.1
  • synctest-deterministic-time

18 Aug 2026 10:56PM UTC coverage: 100.0%. Remained the same
32208357000

push

github

web-flow
Fix v3 data race and Add eviction reporting, correct docs and bump deps (#26)

* Fix data race in v3 Values

Values sized the result slice from c.items before taking the mutex, so a
concurrent Set or Remove could race on the map, or crash with concurrent
map read and map write.

* Report expired entry eviction from v3 Add

Add documents the simplelru contract, returns true if an eviction occurred,
but reported only the capacity eviction. With a non-default TTL it silently
dropped the expired oldest entry, fired onEvicted and counted the eviction in
stats while still returning false.

* Tidy v3 module

* Fix readme example and describe the actual cache semantics

The v3 example did not compile, it type-asserted an already typed string, and
claimed an expired Get returns nil while it returns the stored value with
ok set to false. The example is now mirrored by v3/example_test.go, so the
documented output is verified by go test.

LRC is described as it behaves: the order is defined by the last write, an
existing key is moved to the front on Set, and reads leave the order alone.
Go version requirements per major version are documented as well.

* Wait for ristretto writes in mixed benchmarks

Ristretto applies writes asynchronously, and only BenchmarkRistretto_Set
waited for them to be applied. The mixed benchmarks measured enqueueing a
write and counted rejected writes as successful ones, so their numbers were
not comparable with the synchronous Set of the other libraries. Rejected
writes are now counted and reported as drops/op, and the published tables
are regenerated from a single run on Apple M3.

* Bump go modules and refresh benchmark numbers

Testify moves to v1.12.0 in all three versions, benchmarks get ttlcache
v3.4.1 with x/sync and x/sys pinned to the last releases compatible with
the declared go version. Published tables are regenerated: ttlcache is
noticeably faster since v3.4.1 and no longer allocates on Get.

* Report expired entries as mi... (continued)

161 of 161 relevant lines covered (100.0%)

143.3 hits per line

Relevant lines Covered
Build:
Build:
161 RELEVANT LINES 161 COVERED LINES
143.3 HITS PER LINE
Source Files on master
  • Tree
  • List 2
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
32208357000 refs/tags/v3.1.1 Fix v3 data race and Add eviction reporting, correct docs and bump deps (#26) * Fix data race in v3 Values Values sized the result slice from c.items before taking the mutex, so a concurrent Set or Remove could race on the map, or crash with con... push 19 Aug 2026 02:23AM UTC web-flow github
100.0
32208357001 refs/tags/v3.1.1 Fix v3 data race and Add eviction reporting, correct docs and bump deps (#26) * Fix data race in v3 Values Values sized the result slice from c.items before taking the mutex, so a concurrent Set or Remove could race on the map, or crash with con... push 19 Aug 2026 02:23AM UTC web-flow github
100.0
32208356999 refs/tags/v3.1.1 Fix v3 data race and Add eviction reporting, correct docs and bump deps (#26) * Fix data race in v3 Values Values sized the result slice from c.items before taking the mutex, so a concurrent Set or Remove could race on the map, or crash with con... push 19 Aug 2026 02:23AM UTC web-flow github
100.0
32195029357 master Fix v3 data race and Add eviction reporting, correct docs and bump deps (#26) * Fix data race in v3 Values Values sized the result slice from c.items before taking the mutex, so a concurrent Set or Remove could race on the map, or crash with con... push 18 Aug 2026 10:57PM UTC web-flow github
100.0
32195029347 master Fix v3 data race and Add eviction reporting, correct docs and bump deps (#26) * Fix data race in v3 Values Values sized the result slice from c.items before taking the mutex, so a concurrent Set or Remove could race on the map, or crash with con... push 18 Aug 2026 10:57PM UTC web-flow github
100.0
32195029325 master Fix v3 data race and Add eviction reporting, correct docs and bump deps (#26) * Fix data race in v3 Values Values sized the result slice from c.items before taking the mutex, so a concurrent Set or Remove could race on the map, or crash with con... push 18 Aug 2026 10:57PM UTC web-flow github
100.0
32192741761 fix-values-race-and-docs Describe ristretto write drops accurately, widen example TTL margin Set returns false only when the write buffer is full, an accepted write can still be discarded later by the admission policy, so the metric is a lower bound rather than a count o... Pull #26 18 Aug 2026 10:27PM UTC paskal github
100.0
32192741708 fix-values-race-and-docs Describe ristretto write drops accurately, widen example TTL margin Set returns false only when the write buffer is full, an accepted write can still be discarded later by the admission policy, so the metric is a lower bound rather than a count o... Pull #26 18 Aug 2026 10:27PM UTC paskal github
100.0
32191640909 fix-values-race-and-docs Report expired entries as missing from v3 Contains Contains looked the key up in the map only, so it returned true for an entry Get and Peek already report as a miss, and without a background purge that disagreement lasts until DeleteExpired or a... Pull #26 18 Aug 2026 10:13PM UTC paskal github
100.0
32191643449 fix-values-race-and-docs Report expired entries as missing from v3 Contains Contains looked the key up in the map only, so it returned true for an entry Get and Peek already report as a miss, and without a background purge that disagreement lasts until DeleteExpired or a... Pull #26 18 Aug 2026 10:13PM UTC paskal github
100.0
See All Builds (169)

Badge your Repo: expirable-cache

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc