@extra-memoize/extra-disk-cache
TypeScript icon, indicating that this package has built-in type declarations

0.8.2 • Public • Published

@extra-memoize/extra-disk-cache

The adapter for extra-disk-cache.

Install

npm install --save @extra-memoize/extra-disk-cache
# or
yarn add @extra-memoize/extra-disk-cache

API

DiskCache

class DiskCache<T> implements ICache<T> {
  constructor(
    view: DiskCacheView<string, T>
  , timeToLive?: number
  )
}

StaleWhileRevalidateDiskCache

class StaleWhileRevalidateDiskCache<T> implements IStaleWhileRevalidateCache<T> {
  constructor(
    view: DiskCacheView<string, T>
  , timeToLive: number
  , staleWhileRevalidate: number
  )
}

StaleIfErrorDiskCache

class StaleIfErrorDiskCache<T> implements IStaleIfErrorCache<T> {
  constructor(
    view: DiskCacheView<string, T>
  , timeToLive: number
  , staleIfError: number
  )
}

StaleWhileRevalidateAndStaleIfErrorDiskCache

class StaleWhileRevalidateAndStaleIfErrorDiskCache<T> implements IStaleWhileRevalidateAndStaleIfErrorCache<T> {
  constructor(
    view: DiskCacheView<string, T>
  , timeToLive: number
  , staleWhileRevalidate: number
  , staleIfError: number
  )
}

Readme

Keywords

none

Package Sidebar

Install

npm i @extra-memoize/extra-disk-cache

Weekly Downloads

1

Version

0.8.2

License

MIT

Unpacked Size

16.8 kB

Total Files

18

Last publish

Collaborators

  • black_glory