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

Replace cache with a third party library #66

Open
KwilLuke opened this issue Jan 19, 2024 · 0 comments
Open

Replace cache with a third party library #66

KwilLuke opened this issue Jan 19, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@KwilLuke
Copy link
Contributor

The cache that is implemented in this SDK is too error prone and not worth maintaining.

We should implement either:

  • An isomorphic cache library (or a nodejs cache library with the appropriate polyfills, but that is not ideal because it forces polyfills onto the consumers of the SDK) - candidates include node-cache and memory-cache
  • Use a nodeJS cache in nodeKwil and use localstorage for webKwil - this may require some more refactoring, but may be the better solution if there is not a good isomorphic cache library.

Or, we can just remove the cache! It only helps make less calls to .getSchema() when building transactions (we call the schema to validate that the required inputs are present). That seems like an overoptimization given the scale at which kwil is currently being used.

@KwilLuke KwilLuke added bug Something isn't working enhancement New feature or request labels Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant