Neurosis Prevention Mechanism

    ilp-store-wrapper
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    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.

    Keywords

    none

    Install

    npm i ilp-store-wrapper

    DownloadsWeekly Downloads

    1,334

    Version

    2.0.0

    License

    ISC

    Unpacked Size

    10.6 kB

    Total Files

    7

    Last publish

    Collaborators

    • sharafian