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

Should marketplace items be cached? If so, how many, for how much time? #24

Open
filoozom opened this issue Aug 18, 2022 · 1 comment
Open
Labels

Comments

@filoozom
Copy link
Collaborator

There are two different data sources that need to be kept in sync:

  • Waku
  • Blockchain events

The caching / fetching strategy needs to be compatible with both technologies.

Currently all marketplace items are refetched when the marketplace is open. Of course, this will quickly become unscalable, as with thousands of items it would take a lot of time to load. We could cache those items, but with multiple marketplaces having many items each, that would quickly take up a lot of space.

Alternatively, we could fetch the last x items and implement infinite scrolling

  • Technically we can't just say "give me the last 100 events"
  • It could kind of be simulated by calling getLogs on lastBlock - x - i * x to lastBlock - i * x in a loop where x is some arbitrary number and i increases by 1 in each iteration
@lucille-bellepleure
Copy link
Collaborator

can we close this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants