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(cache)!: BadgerDB and db.Get() with already hashed value and TTL #183

Merged
merged 29 commits into from
Feb 8, 2024

Conversation

aleksasiriski
Copy link
Member

@aleksasiriski aleksasiriski commented Jan 17, 2024

This must be merged after #181

  • Switch to BadgerDB, replacing Pebble because of more maturity and larger community
  • db.Get() for cached only results
  • TTL insertion and logic
    • Default TTL is 7 days
    • By default, when a cached result is retrieved it's TTL is also checked and if the remaining TTL is less than 3 days the results are updated in the background
  • Unit tests
    • nocache
    • Badger
    • Redis
      • Redis container available in CI

Refactor:

  • Moved duplicate code found in climode and router to search

@aleksasiriski aleksasiriski changed the base branch from main to anon-and-hashed-queries January 17, 2024 16:56
@aleksasiriski aleksasiriski requested a review from k4lizen January 17, 2024 17:01
@aleksasiriski aleksasiriski marked this pull request as draft January 17, 2024 17:11
@aleksasiriski aleksasiriski changed the title feat(cache)!: BadgerDB and db.Get() with already hashed value feat(cache)!: BadgerDB and db.Get() with already hashed value and TTL Jan 21, 2024
@aleksasiriski aleksasiriski marked this pull request as ready for review February 4, 2024 19:41
@aleksasiriski aleksasiriski changed the base branch from anon-and-hashed-queries to main February 4, 2024 20:09
@aleksasiriski aleksasiriski changed the base branch from main to anon-and-hashed-queries February 4, 2024 20:09
Base automatically changed from anon-and-hashed-queries to main February 7, 2024 23:49
@aleksasiriski aleksasiriski merged commit a1894eb into main Feb 8, 2024
5 of 6 checks passed
@aleksasiriski aleksasiriski deleted the badger-db branch February 8, 2024 12:35
@aleksasiriski aleksasiriski mentioned this pull request Mar 7, 2024
3 tasks
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.

2 participants