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

Fix zero value Cache default expiration #42

Merged
merged 1 commit into from
May 6, 2023

Conversation

erni27
Copy link
Owner

@erni27 erni27 commented May 6, 2023

This PR fixes Cache default expiration.

Before, Cache had defaultExp field set to 0 (integer zero value) meaning the entry always expires immediately after the expiration is set. This PR extends init method by setting default expiration to -1 (noExp).

@erni27 erni27 added the bug Something isn't working label May 6, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #42 (ae3fa85) into master (8231e75) will increase coverage by 0.00%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##           master      #42   +/-   ##
=======================================
  Coverage   95.81%   95.81%           
=======================================
  Files           8        8           
  Lines         716      717    +1     
=======================================
+ Hits          686      687    +1     
  Misses         26       26           
  Partials        4        4           
Impacted Files Coverage Δ
imcache.go 98.90% <100.00%> (+<0.01%) ⬆️

@erni27 erni27 merged commit 5b7d897 into master May 6, 2023
4 checks passed
@erni27 erni27 deleted the fix-zero-value-default-expiration branch May 6, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants