class cacheManager.CacheManager

CacheManager: Manager class for the cache This component is used to manage the cache of the Jikan API The cache isn't implemented yet, the manager only creates a cache directory and deletes it when the program exits

Constructors

new
CacheManager(
client: JikanClient,
options?: Partial<CacheOptions>,
)

Properties

readonly
cachePath: string
private
readonly
_client: JikanClient
private
readonly
options: CacheOptions

Cache options containing the cache options

Methods

private
_getDefaultCache(): string
get(query: APIRequestQuery): APICacheResponse | null
set(
query: APIRequestQuery,
data: JSON,
): void

Static Methods

private
setDefaultOptions(options?: Partial<CacheOptions>): CacheOptions