@nasriya/cachify
Version:
A lightweight, extensible in-memory caching library for storing anything, with built-in TTL and customizable cache types.
35 lines (34 loc) • 1.29 kB
JavaScript
import EvictConfig from "./evict/EvictConfig.js";
import IdleConfig from "./idle/IdleConfig.js";
import TTLConfig from "./ttl/TTLConfig.js";
class CacheConfig {
constructor(updateStatus, flavor) {
this.
this.
this.
}
/**
* Retrieves the TTL configuration for the cache.
* The TTL configuration determines the behavior of expired records.
* @returns {TTLConfig<F>} The TTL configuration.
*/
get ttl() { return this.
/**
* Retrieves the eviction configuration for the cache.
* The eviction configuration determines the policy for removing records
* when the cache reaches its capacity.
* @returns {EvictConfig} The eviction configuration.
*/
get eviction() { return this.
/**
* Retrieves the idle configuration for the cache.
* The idle configuration determines the behavior of the cache when it is not
* accessed for a certain amount of time.
* @returns {IdleConfig} The idle configuration.
*/
get idle() { return this.
}
export default CacheConfig;