UNPKG

@nasriya/cachify

Version:

A lightweight, extensible in-memory caching library for storing anything, with built-in TTL and customizable cache types.

52 lines (51 loc) 1.61 kB
import ExtEngines from "./api/engines/ext.engines"; import ExtPersistenceManager from "./api/persistence/ext.persistence.manager"; import FilesCacheManager from "./core/flavors/files/files.manager"; import KVsCacheManager from "./core/flavors/kvs/kvs.manager"; export declare class CachifyClient { #private; /** * Access the engines manager. * * The engines manager is used to configure and access the engines * used by the cache system to store records. * * @since v1.0.0 */ readonly engines: ExtEngines; /** * Retrieves the events broker for the cache system. * * The events broker is used to emit and listen to cache-related events. * * @since v1.0.0 */ get events(): import("./core/events/broker/EventsBroker").default; /** * Access the key-value cache manager. * @returns {KVCacheManager} * @since v1.0.0 */ get kvs(): KVsCacheManager; /** * Access the file cache manager. * @returns {FileCacheManager} * @since v1.0.0 */ get files(): FilesCacheManager; /** * * @since v1.0.0 */ readonly persistence: ExtPersistenceManager; /** * Clears the cache for the specified scope or for all scopes if no scope is provided. * * This method delegates the clearing operation to the `clear` method of all cache managers. * * @param {string} [scope] - The scope for which to clear the cache. If not provided, clears all scopes. * @since v1.0.0 */ clear(scope?: string): Promise<void>; } export default CachifyClient;