@extra-memoize/extra-disk-cache
v0.8.2
Published
The adapter for [extra-disk-cache].
Downloads
23
Readme
@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
)
}