aragon / aragon.js

(Aragon 1) A monorepo of JavaScript libraries for interacting with Aragon
https://aragon.org
GNU Affero General Public License v3.0
82 stars 58 forks source link

Static Cache Tracker utility #450

Closed namesty closed 3 years ago

namesty commented 3 years ago

This PR aims to close #400.

Currently, localForage is being used for caching in @aragon/wrapper. And while keys for each DB is being saved so that they can be cleared later, the actual DB instances persisted in the browser's IndexedDB/Storage. Also, since trackedKeys are being saved in memory and not being persisted, a refresh makes the app lose track of its previous keys.

I created a static utility that creates a localForage instance that saves each DB instance created and persists their names, so that they can be later retrieved and erased without needing to wipe the browser's complete IndexedDB. I am exposing this utility for the client to use.

This change is non-disruptive in regards to the current interfaces.

I just need to make the tests for it

welcome[bot] commented 3 years ago

Thanks for opening this pull request! Someone will review it soon 🔍

CLAassistant commented 3 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

namesty commented 3 years ago

It seems ACL related tests are failing, what are they used for? @nivida. The rest was taken care of

stale[bot] commented 3 years ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for contributing to Aragon! 🦅