Skip to content

Wrapper for ILP store to handle caching and persistence

Notifications You must be signed in to change notification settings

interledgerjs/ilp-store-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ILP Store Wrapper

Synchronous wrapper around ILP store

The constructor takes an ILP store.

const wrappedStore = new StoreWrapper(store)
  • .load(key) -> Promise<null> 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.

About

Wrapper for ILP store to handle caching and persistence

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published