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

Add v3 compatible with simplelru #10

Merged
merged 2 commits into from
Feb 20, 2024
Merged

Conversation

paskal
Copy link
Collaborator

@paskal paskal commented Feb 19, 2024

v2 had most of the required functions, so this change adds missing ones to satisfy the simplelru interface, addressing #6.

To do that, RemoveOldest started returning parameters, unlike being void as before.

Another behaviour change is that Get and Peek now return the cached value in case it has already expired to be consistent with the simplelru implementation.

Also, GetExpiration has been added, which resolves #7.

@paskal paskal requested a review from umputun February 19, 2024 03:22
Copy link

Pull Request Test Coverage Report for Build 7954144825

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 7953908422: 0.0%
Covered Lines: 166
Relevant Lines: 166

💛 - Coveralls

Copy link

github-actions bot commented Feb 19, 2024

Pull Request Test Coverage Report for Build 7977500528

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 7977456689: 0.0%
Covered Lines: 166
Relevant Lines: 166

💛 - Coveralls

@paskal paskal force-pushed the paskal/simplelru_compatibility branch 2 times, most recently from 99127fd to f51a0e7 Compare February 20, 2024 15:49
@paskal
Copy link
Collaborator Author

paskal commented Feb 20, 2024

I moved v2 copy to a separate commit to simplify the review.

@paskal paskal force-pushed the paskal/simplelru_compatibility branch 2 times, most recently from a13f9f8 to 069c324 Compare February 20, 2024 18:02
@paskal paskal force-pushed the paskal/simplelru_compatibility branch 2 times, most recently from 6a4b028 to 37b55b5 Compare February 20, 2024 19:56
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 change is that Get and Peek now return
the cached value in case it has already expired to be consistent with
the `simplelru` implementation.

Also, GetExpiration is added.
@paskal paskal force-pushed the paskal/simplelru_compatibility branch from 37b55b5 to f92250c Compare February 20, 2024 20:01
@umputun umputun merged commit ebdead2 into master Feb 20, 2024
4 checks passed
@umputun umputun deleted the paskal/simplelru_compatibility branch February 20, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Add option to get expiry time
2 participants