Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for a default TTL #8

Merged
merged 3 commits into from Nov 8, 2022
Merged

feat: Add support for a default TTL #8

merged 3 commits into from Nov 8, 2022

Conversation

TwiN
Copy link
Owner

@TwiN TwiN commented Nov 8, 2022

Summary

This PR adds support for setting a default TTL using WithDefaultTTL.

This change is fully backward compatible, both at the API and at the behavioral level since before, the default TTL was gocache.NoExpiration and after this change, that remains unchanged.

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Added the documentation in README.md, if applicable.

@TwiN TwiN added the enhancement New feature or request label Nov 8, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2022

Codecov Report

Base: 98.65% // Head: 98.67% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (78a3710) compared to base (eab552f).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master       #8      +/-   ##
==========================================
+ Coverage   98.65%   98.67%   +0.02%     
==========================================
  Files           4        4              
  Lines         446      454       +8     
==========================================
+ Hits          440      448       +8     
  Misses          4        4              
  Partials        2        2              
Impacted Files Coverage Δ
gocache.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TwiN TwiN merged commit 1651d3a into master Nov 8, 2022
@TwiN TwiN deleted the feat/default-ttl branch November 8, 2022 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants