bigcache icon indicating copy to clipboard operation
bigcache copied to clipboard

Go defaults to "0"" so in case we want to return

Open jgheewala opened this issue 6 years ago • 14 comments

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

jgheewala avatar Oct 09 '19 04:10 jgheewala

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.

siennathesane avatar Oct 09 '19 19:10 siennathesane

@mxplusb this PR can be open until its ready to go in. I kept it here so that I do not forget about this :)

jgheewala avatar Oct 09 '19 20:10 jgheewala

Great, thanks!

siennathesane avatar Oct 09 '19 20:10 siennathesane

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 avatar Mar 02 '20 05:03 flisky

@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.

cristaloleg avatar Mar 02 '20 08:03 cristaloleg

@jgheewala when you get a chance, can you rebase? It would be good to keep this updated to prep for the next major version.

siennathesane avatar Mar 03 '20 17:03 siennathesane

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 avatar Mar 25 '20 03:03 flisky

@flisky let's create a separate issue for your idea and discuss it there. This will make discussion much more visible and structured, thanks :)

cristaloleg avatar Mar 25 '20 07:03 cristaloleg

@mxplusb was super busy will rebase my changes soon

jgheewala avatar Apr 15 '20 17:04 jgheewala

@mxplusb done with the conflicts.

jgheewala avatar Aug 25 '20 18:08 jgheewala

@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.

siennathesane avatar Oct 05 '20 19:10 siennathesane

Codecov Report

Merging #181 (c3845a8) into master (92a824f) will increase coverage by 0.45%. The diff coverage is n/a.

Impacted file tree graph

@@            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 data Powered by Codecov. Last update 92a824f...c3845a8. Read the comment docs.

codecov-io avatar Nov 17 '20 16:11 codecov-io

@mxplusb https://github.com/allegro/bigcache/pull/255

jgheewala avatar Nov 17 '20 16:11 jgheewala

Codecov Report

Merging #181 (c3845a8) into master (92a824f) will increase coverage by 0.45%. The diff coverage is n/a.

Impacted file tree graph

@@            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 data Powered by Codecov. Last update 92a824f...c3845a8. Read the comment docs.

codecov-commenter avatar Apr 11 '22 12:04 codecov-commenter