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

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

Build:
Build:
LAST BUILD BRANCH: refs/tags/v3.1.0
DEFAULT BRANCH: master
Repo Added 12 May 2020 12:41AM UTC
Token Cpf6khbZz7kxcUNpVAl3ukP2SnQhbD108 regen
Build 175 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.0
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • fix-CVE-2019-11254
  • generics
  • master
  • paskal/add_benchmarks
  • paskal/benchmarks
  • paskal/bump_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

15 Apr 2025 02:03AM UTC coverage: 100.0%. Remained the same
17701788650

push

github

web-flow
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 iteration

2. DeleteExpired method:
   - Replace key slice allocation with direct list traversal
   - Cache time.Now() call for efficiency, move out of lock
   - Avoid redundant map lookups
   - Properly handle list traversal during element removal

3. Add method:
   - Cache time.Now() and move out of lock

All optimizations preserve API compatibility while reducing allocations and CPU work.

Signed-off-by: Mathias Bogaert <mathias.bogaert@gmail.com>

* Remove unused method.

Signed-off-by: Mathias Bogaert <mathias.bogaert@gmail.com>

* Downgrade go requirement for v3 back to 1.20

* Apply performance optimizations to v1 and v2 versions

- Move ttl check and time.Now() outside lock to reduce lock contention
- Optimize DeleteExpired with direct list traversal
- Remove unused removeOldestIfExpired method
- Use same inline expiration check

* Update benchmark results in README files

- Update benchmark results in main README with latest performance metrics
- Update benchmarks README with current numbers
- Adjust performance improvement percentages to reflect latest changes

---------

Signed-off-by: Mathias Bogaert <mathias.bogaert@gmail.com>
Co-authored-by: Dmitry Verkhoturov <paskal.07@gmail.com>

13 of 13 new or added lines in 1 file covered. (100.0%)

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
  • List 2
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
17701788650 refs/tags/v3.1.0 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 13 Sep 2025 08:40PM 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
14173478019 perf Update benchmark results in README files - Update benchmark results in main README with latest performance metrics - Update benchmarks README with current numbers - Adjust performance improvement percentages to reflect latest changes Pull #18 31 Mar 2025 02:06PM UTC paskal 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
13823797309 paskal/add_benchmarks Add readme explanation for the benchmarks Pull #15 12 Mar 2025 11:54PM UTC paskal github
100.0
13823781316 paskal/modernise Update modules, ping gonlangci-lint, fix go actions caching Pull #16 12 Mar 2025 11:52PM UTC paskal github
100.0
13823747942 paskal/add_benchmarks Add proper go modules caching to v2 and v3 Pull #15 12 Mar 2025 11:49PM UTC paskal github
100.0
13823721564 paskal/add_benchmarks Downgrade golangci-lint Pull #15 12 Mar 2025 11:47PM UTC paskal github
100.0
13823721540 paskal/add_benchmarks Downgrade golangci-lint Pull #15 12 Mar 2025 11:47PM UTC paskal github
100.0
See All Builds (135)

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 · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc