Skip to content

Type Alias: Options

ts
type Options = object;

Options types contain all the configuration options that can be set in the constructor

Default

ts
//options
{
	ttl: { seconds: 0, minutes: 0, hours: 1, days: 0 },
	removeExpired: true,
	storage: StorageType.Auto
}

Properties

removeExpired

ts
removeExpired: boolean;

Automatically removes expired items when attempting to access them.


storage

ts
storage: StorageEngine;

The storage engine to use.


ttl

ts
ttl: Partial<TTL>;

The time to live for data in the cache.