interface cacheManager.CacheOptions

Properties

Cache expiration time in milliseconds

This is used to cache the response from the Jikan API, cache response won't be rate limited if it's still valid

Any modification of this value will be ignored during the program execution

Default 86400000 (1 day)

cache: boolean

Enable or disable the cache

Because of the limited rate limit of the Jikan API, it's recommended to enable the cache

Default true

Delete the cache when the program exits

note: Due to an issue with Deno, this option will add an event listener to the SIGINT signal in order exit the program and delete the cache

Any modification of this value will be ignored during the program execution

Default true

cachePath: string

Data path for the cache

Default is the system temp directory

Any modification of this value will be ignored during the program execution

Usage

import { cacheManager } from ".";