Skip to main content

MemoizeOptions <T>

Index

Properties

optionalcache

cache?: null | MemoizeCache<T>

A custom Map instance to store cached values. Can also be used to pre-cache expected values.

optionalexpires

expires?: number

Time in milliseconds in which to keep the cache alive (TTL). Pass 0 to cache indefinitely. Defaults to 0.

optionalhasher

hasher?: MemoizeHasher

A hashing function to determine the cache key. Is passed the method's arguments and must return a string. If not provided, arguments are hashed using JSON.stringify().