Go defaults to "0"" so in case we want to return
EntryStatus back to the caller "Expired" cannot be differentiated. Fixing this by default "_" to 0 and incremental RemoveReasons
comment was missing for GetWithInfo api so updated that
test: ran all unit test cases
I quite like this PR and problem it solves, but I agree this is definitely a 3.0 decision since it could break a lot of downstream configurations when they upgrade. This should definitely go in the release notes.
@mxplusb this PR can be open until its ready to go in. I kept it here so that I do not forget about this :)
Great, thanks!
So, the error ErrEntryIsDead has no more referenced and should be removed ? Will give users a compile error in case they don't notice this breaking change.
@flisky good point, we can remove it. But anyway, this PR is for a next major version, so it will be safe to make a breaking change.
@jgheewala when you get a chance, can you rebase? It would be good to keep this updated to prep for the next major version.
May I take over of it, @jgheewala & @mxplusb ?
Besides these changes, I also want to return the expired entry even when resp.EntryStatus = Expired( entry goes []byte when introduced in #168 , and then goes to nil in #191 ). Do you like the idea?
@flisky let's create a separate issue for your idea and discuss it there. This will make discussion much more visible and structured, thanks :)
@mxplusb was super busy will rebase my changes soon
@mxplusb done with the conflicts.
@jgheewala there's a new branch, called versions/v3-prep which has the underlying necessary module changes to support this PR. If you can rebase against that branch, and then edit the PR to point to the versions/v3-prep branch, I can get this merged and we can close it out.
Codecov Report
Merging #181 (c3845a8) into master (92a824f) will increase coverage by
0.45%. The diff coverage isn/a.
@@ Coverage Diff @@
## master #181 +/- ##
==========================================
+ Coverage 86.56% 87.01% +0.45%
==========================================
Files 15 15
Lines 640 647 +7
==========================================
+ Hits 554 563 +9
+ Misses 71 68 -3
- Partials 15 16 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| bigcache.go | 98.79% <ø> (ø) |
|
| queue/bytes_queue.go | 87.82% <0.00%> (-1.07%) |
:arrow_down: |
| shard.go | 86.75% <0.00%> (+1.82%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 92a824f...c3845a8. Read the comment docs.
@mxplusb https://github.com/allegro/bigcache/pull/255
Codecov Report
Merging #181 (c3845a8) into master (92a824f) will increase coverage by
0.45%. The diff coverage isn/a.
@@ Coverage Diff @@
## master #181 +/- ##
==========================================
+ Coverage 86.56% 87.01% +0.45%
==========================================
Files 15 15
Lines 640 647 +7
==========================================
+ Hits 554 563 +9
+ Misses 71 68 -3
- Partials 15 16 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| bigcache.go | 98.79% <ø> (ø) |
|
| queue/bytes_queue.go | 87.82% <0.00%> (-1.07%) |
:arrow_down: |
| shard.go | 86.75% <0.00%> (+1.82%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 92a824f...c3845a8. Read the comment docs.