• 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 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 master
branch: master
CHANGE BRANCH
x
Reset
Sync Branches
  • master
  • fix-CVE-2019-11254
  • generics
  • 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
14459642506

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
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
12380493465 master add missing CODEOWNERS files push 17 Dec 2024 08:02PM UTC umputun github
100.0
10155843947 master add benchmarks to v1 and v2, fix golangci-lint warns and errors push 30 Jul 2024 03:54AM UTC umputun github
100.0
10155843952 master add benchmarks to v1 and v2, fix golangci-lint warns and errors push 30 Jul 2024 03:54AM UTC umputun github
100.0
10155843956 master add benchmarks to v1 and v2, fix golangci-lint warns and errors push 30 Jul 2024 03:54AM UTC umputun github
100.0
7979726216 master add v3 compatible with simplelru v2 had most of the required functions, so this change adds missing ones to satisfy the simplelru interface. To do that, RemoveOldest started returning parameters, unlike being void as before. Another behaviour c... push 20 Feb 2024 08:43PM UTC umputun github
100.0
7979726215 master add v3 compatible with simplelru v2 had most of the required functions, so this change adds missing ones to satisfy the simplelru interface. To do that, RemoveOldest started returning parameters, unlike being void as before. Another behaviour c... push 20 Feb 2024 08:43PM UTC umputun github
100.0
7977456674 master bump CI actions, use single .golangci.yml file for all versions push 20 Feb 2024 05:21PM UTC umputun 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