typerinth
Version:
A TypeScript library for interacting with the Modrinth API.
27 lines (26 loc) • 670 B
TypeScript
import NodeCache from 'node-cache';
export default class CacheManager {
private cache;
constructor(cache?: NodeCache | null);
/**
* Checks if the cache is enabled
* @returns {boolean} Whether the cache is enabled
*/
isEnabled(): boolean;
/**
* Gets a value from the cache
* @param key - The key to get
*/
get(key: string): any;
/**
* Sets a value in the cache
* @param key - The key to set
* @param value - The value to set
*/
set(key: string, value: any): void;
/**
* Deletes a value from the cache
* @param key - The key to delete
*/
delete(key: string): void;
}