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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving on closed cache #14

Merged
merged 4 commits into from Sep 17, 2019

Conversation

@aphelionz
Copy link
Contributor

aphelionz commented Sep 13, 2019

This PR:

  1. Implements open and close functions that return if the database is already open or closed respectively, or perform the action
  2. Added this.handlers
  3. Added Cache.removeHandlers, to be called from OrbitDB._onClose, which is a hook from Store.close 馃

Note: I didn't implement addHandler since there's no additional logic besides the native this.handlers.add call required yet.

src/Cache.js Outdated Show resolved Hide resolved
src/Cache.js Outdated Show resolved Hide resolved
@aphelionz aphelionz force-pushed the experiment/cache-open branch from cdaa2a2 to 6b7108e Sep 16, 2019
Now opening caches, but not closing, on retrieval as a workaround

No more opening after all
@aphelionz aphelionz force-pushed the experiment/cache-open branch from c4c2686 to 6428a60 Sep 16, 2019
aphelionz added 2 commits Sep 16, 2019
src/Cache.js Show resolved Hide resolved
@aphelionz aphelionz merged commit 4e35e00 into master Sep 17, 2019
4 checks passed
4 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test-browser Your tests passed on CircleCI!
Details
ci/circleci: test-node Your tests passed on CircleCI!
Details
@aphelionz aphelionz deleted the experiment/cache-open branch Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.