• Persistent Cache

    Returns

    Parameters

    Returns {
        delete: ((name: string, cb: {
            (e: Error, ...args: any[]): any;
            (err: ErrnoException): void;
        }) => void);
        deleteSync: ((name: any) => void);
        get: ((name: string, cb?: ((e: Error) => any)) => any);
        getSync: (<T>(name: string, fallback?: T) => T);
        keys: ((cb: ((e: Error, ...args: any[]) => any)) => any);
        keysSync: (() => any[]);
        put: ((name: string, data: any, cb: {
            (err: ErrnoException): void;
            (e: Error, ...args: any[]): any;
        }) => any);
        putSync: ((name: string, data: any) => void);
        set: ((name: string, data: any, cb: {
            (err: ErrnoException): void;
            (e: Error, ...args: any[]): any;
        }) => any);
        setSync: ((name: string, data: any) => void);
        unlink: ((cb: {
            (e: Error, ...args: any[]): any;
            (e: Error, ...args: any[]): any;
        }) => any);
        valuesSync: (() => any[]);
    }

    • delete: ((name: string, cb: {
          (e: Error, ...args: any[]): any;
          (err: ErrnoException): void;
      }) => void)
        • (name: string, cb: {
              (e: Error, ...args: any[]): any;
              (err: ErrnoException): void;
          }): void
        • Parameters

          Returns void

    • deleteSync: ((name: any) => void)
        • (name: any): void
        • Parameters

          • name: any

          Returns void

    • get: ((name: string, cb?: ((e: Error) => any)) => any)
        • (name: string, cb?: ((e: Error) => any)): any
        • get data

          Parameters

          • name: string
          • Optional cb: ((e: Error) => any)

          Returns any

    • getSync: (<T>(name: string, fallback?: T) => T)
        • <T>(name: string, fallback?: T): T
        • Type Parameters

          • T = string

          Parameters

          • name: string
          • Optional fallback: T

          Returns T

    • keys: ((cb: ((e: Error, ...args: any[]) => any)) => any)
        • (cb: ((e: Error, ...args: any[]) => any)): any
        • Parameters

          • cb: ((e: Error, ...args: any[]) => any)
              • (e: Error, ...args: any[]): any
              • Parameters

                • e: Error
                • Rest ...args: any[]

                Returns any

          Returns any

    • keysSync: (() => any[])
        • (): any[]
        • Returns any[]

    • put: ((name: string, data: any, cb: {
          (err: ErrnoException): void;
          (e: Error, ...args: any[]): any;
      }) => any)
        • (name: string, data: any, cb: {
              (err: ErrnoException): void;
              (e: Error, ...args: any[]): any;
          }): any
        • insert new data

          Parameters

          Returns any

    • putSync: ((name: string, data: any) => void)
        • (name: string, data: any): void
        • Parameters

          • name: string
          • data: any

          Returns void

    • set: ((name: string, data: any, cb: {
          (err: ErrnoException): void;
          (e: Error, ...args: any[]): any;
      }) => any)
        • (name: string, data: any, cb: {
              (err: ErrnoException): void;
              (e: Error, ...args: any[]): any;
          }): any
        • insert new data

          Parameters

          Returns any

    • setSync: ((name: string, data: any) => void)
        • (name: string, data: any): void
        • Parameters

          • name: string
          • data: any

          Returns void

    • unlink: ((cb: {
          (e: Error, ...args: any[]): any;
          (e: Error, ...args: any[]): any;
      }) => any)
        • (cb: {
              (e: Error, ...args: any[]): any;
              (e: Error, ...args: any[]): any;
          }): any
        • delete the folder and files of a persistent cache

          Parameters

          • cb: {
                (e: Error, ...args: any[]): any;
                (e: Error, ...args: any[]): any;
            }
              • (e: Error, ...args: any[]): any
              • Parameters

                • e: Error
                • Rest ...args: any[]

                Returns any

              • (e: Error, ...args: any[]): any
              • Parameters

                • e: Error
                • Rest ...args: any[]

                Returns any

          Returns any

    • valuesSync: (() => any[])
        • (): any[]
        • get all values

          Returns any[]