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

Frontend cache for llamas #720

Merged
merged 4 commits into from
Aug 29, 2023
Merged

Frontend cache for llamas #720

merged 4 commits into from
Aug 29, 2023

Conversation

ferostabio
Copy link
Contributor

@ferostabio ferostabio commented Aug 16, 2023

close #717

In order to reduce the number of calls we make to an API (Defillama or ours) and before deploying our own express + redis API, I added a local cache with indexedDB.

Now we will only call an API to get the data once in fifteen minutes -rest of the time we'll load data locally.

In order to do this, I had to decouple to functions on the sdk that were calling an API and parsing through its response.

@vercel
Copy link

vercel bot commented Aug 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuji-v2-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2023 1:23pm

@ferostabio
Copy link
Contributor Author

@daigarocota @NikolaiYurchenko please have a look 🚀

@ferostabio ferostabio merged commit 18b6b46 into main Aug 29, 2023
3 of 4 checks passed
@ferostabio ferostabio deleted the sdk/feat/cache branch August 29, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Defillama cache
2 participants