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

go-pkgz / expirable-cache
100%

Build:
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 master
branch: master
CHANGE BRANCH
x
Reset
Sync Branches
  • master
  • fix-CVE-2019-11254
  • fix-ci-caching
  • fix-values-race-and-docs
  • generics
  • 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
32195029357

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)

168 of 168 relevant lines covered (100.0%)

137.08 hits per line

Relevant lines Covered
Build:
Build:
168 RELEVANT LINES 168 COVERED LINES
137.08 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
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
22027785352 master Merge pull request #25 from go-pkgz/synctest-deterministic-time Rewrite v3 time-dependent tests with testing/synctest push 15 Feb 2026 01:50AM UTC web-flow github
100.0
19903535070 master Fix CI workflow: checkout before setup-go for proper caching (#23) - Move checkout step before setup-go to enable Go module caching - setup-go needs go.mod/go.sum files to generate cache keys - Fix cache-dependency-path placement in YAML for v2/v... push 03 Dec 2025 05:51PM UTC web-flow github
100.0
19903535069 master Fix CI workflow: checkout before setup-go for proper caching (#23) - Move checkout step before setup-go to enable Go module caching - setup-go needs go.mod/go.sum files to generate cache keys - Fix cache-dependency-path placement in YAML for v2/v... push 03 Dec 2025 05:51PM UTC web-flow github
100.0
19903535062 master Fix CI workflow: checkout before setup-go for proper caching (#23) - Move checkout step before setup-go to enable Go module caching - setup-go needs go.mod/go.sum files to generate cache keys - Fix cache-dependency-path placement in YAML for v2/v... push 03 Dec 2025 05:51PM UTC web-flow github
100.0
14459642506 master Optimize core cache operations for performance, Go 1.24 (#18) * Optimize core cache operations for performance, Go 1.24 Improve performance in frequently used cache methods: 1. Values method: - Move time.Now() outside of lock - Simplify i... push 15 Apr 2025 02:03AM UTC web-flow github
100.0
13825013328 master Add readme explanation for the benchmarks push 13 Mar 2025 01:30AM UTC umputun github
100.0
13825007901 master Update modules, ping gonlangci-lint, fix go actions caching push 13 Mar 2025 01:30AM UTC umputun 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