Skip to content

Latest commit

 

History

History
72 lines (38 loc) · 1.12 KB

faastjs.persistentcache._constructor_.md

File metadata and controls

72 lines (38 loc) · 1.12 KB
id title hide_title
faastjs.persistentcache._constructor_
PersistentCache.(constructor)
true

faastjs > PersistentCache > (constructor)

PersistentCache.(constructor)

Construct a new persistent cache, typically used with Limits as part of the arguments to throttle().

Signature:

constructor(
    dirRelativeToHomeDir: string, 
    expiration?: number);

Parameters

Parameter

Type

Description

dirRelativeToHomeDir

string

The directory under the user's home directory that will be used to store cached values. The directory will be created if it doesn't exist.

expiration

number

(Optional) The age (in ms) after which a cached entry is invalid. Default: 24*3600*1000 (1 day).