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:  |