Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

IndexedDB support with PubSub/Live Updates #20

Closed
pcfreak30 opened this issue Apr 9, 2023 · 2 comments · Fixed by #35
Closed

IndexedDB support with PubSub/Live Updates #20

pcfreak30 opened this issue Apr 9, 2023 · 2 comments · Fixed by #35
Labels
kind/bug A bug in existing code (including security flaws) released

Comments

@pcfreak30
Copy link

pcfreak30 commented Apr 9, 2023

I am developing with Helia in the browser and things work, but the thing that gets a hit/misses the most at the moment is IPNS lookups.

I would like to see 2 things:

  • Storing the IPNS entries to an IndexedDB cache, with the block store or data store, with an expiration time.
  • When you have cached entries, have a means of live updating to be able to refresh the newer entry in the background.

I will work on this in the future if required but would be nice to have it done upstream.

Kudos!

@achingbrain
Copy link
Member

Sounds like an oversight - once resolved we should cache the record in the local datastore at the end of the #findIpnsRecord method

@achingbrain achingbrain added the kind/bug A bug in existing code (including security flaws) label Apr 19, 2023
achingbrain added a commit that referenced this issue May 5, 2023
After resolving one or more IPNS records, use the selector to choose
one and then cache the result.

Fixes #20
achingbrain added a commit that referenced this issue May 9, 2023
After resolving one or more IPNS records, use the selector to choose
one and then cache the result.

Fixes #20
github-actions bot pushed a commit that referenced this issue May 9, 2023
## [@helia/ipns-v1.1.2](https://github.com/ipfs/helia-ipns/compare/@helia/ipns-v1.1.1...@helia/ipns-v1.1.2) (2023-05-09)

### Bug Fixes

* cache IPNS entries after resolving ([#35](#35)) ([704b413](704b413)), closes [#20](#20)
@github-actions
Copy link

github-actions bot commented May 9, 2023

🎉 This issue has been resolved in version @helia/ipns-v1.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws) released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants