https://github.com/interledgerjs/ilp-store-wrapper
Wrapper for ILP store to handle caching and persistence
https://github.com/interledgerjs/ilp-store-wrapper
Last synced: about 1 month ago
JSON representation
Wrapper for ILP store to handle caching and persistence
- Host: GitHub
- URL: https://github.com/interledgerjs/ilp-store-wrapper
- Owner: interledgerjs
- Created: 2018-01-27T22:42:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-13T20:31:43.000Z (almost 8 years ago)
- Last Synced: 2025-02-25T14:56:17.910Z (over 1 year ago)
- Language: TypeScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ILP Store Wrapper
> Synchronous wrapper around ILP store
The constructor takes an ILP store.
```js
const wrappedStore = new StoreWrapper(store)
```
- `.load(key) -> Promise` will read a key asynchronously into the cache.
- `.get(key) -> value` will synchronously read from the cache.
- `.set(key, value) -> null` will synchronously write to the cache and queue a write to the store (with order guaranteed).
- `.delete(key) -> null` will synchronously delete from the cache and queue a delete to the store (with order guaranteed).
- `.setCache(key, value) -> null` will synchronously write to the cache and NOT queue any write to the store.