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

refactor: used hash of url and body as a cache key #1176

Conversation

Yashk767
Copy link
Contributor

@Yashk767 Yashk767 commented Jan 4, 2024

Description

Primary key for caching is changed tohash of URL and body instead of just URL as most of the POST jobs that we have the same URL which is the RPC.

Fixes https://linear.app/interstellar-research/issue/RAZ-658

How Has This Been Tested?

Ran a staker on staging when it has multiple post jobs assigned in the same epoch.

@Yashk767 Yashk767 changed the title refactor: used hash of url and body as cache key instead of just url refactor: used hash of url and body as a cache key Jan 4, 2024
utils/asset_test.go Outdated Show resolved Hide resolved
@Yashk767 Yashk767 requested a review from yohanelly95 January 5, 2024 07:10
@Yashk767 Yashk767 merged commit d076432 into develop Jan 5, 2024
6 checks passed
Yashk767 added a commit that referenced this pull request Jan 17, 2024
#1177)

* fix: conversion of hex to decimal (#1167)

* fix: conversion of hex to decimal

* fix: convertToNumber tests fixed

* feat: added support for job returning results in hex array (#1174)

* feat: added support for jobs returning result in hex array

* feat: added tests for hex array decoding and regex functions

* refactor: fixed golangci-lint errors

* refactor: used hash of url and body as a cache key (#1176)

* refactor: used hash of url and body as cache key instead of just url

* fix: replaced with new cacheKey while reading from cache

* refactor: added tests for different job cases

* refcator: added missing coverage test cases

* refcator: fixed tests

* refactor: fixted tests by replcing binance API with coinbase API

* refactor: job index changed in test name

* fix: conversion of hex to decimal (#1167) (#1169) (#1178)

* fix: conversion of hex to decimal

* fix: convertToNumber tests fixed
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.

3 participants