-
Notifications
You must be signed in to change notification settings - Fork 1
CacheManager
Sebastián Martínez edited this page Dec 29, 2025
·
1 revision
Categoría: Utilities | ⬅️ Volver al índice
class CacheManager {
constructor(options?: CacheManagerOptions);
set<T>(key: string, value: T, ttl?: number): void;
get<T>(key: string): T | null;
has(key: string): boolean;
remove(key: string): void;
clear(): void;
async getOrCompute<T>(
key: string,
fn: () => Promise<T>,
ttl?: number
): Promise<T>;
invalidatePattern(pattern: string): void;
getStats(): CacheStats;
}
function createCacheManager(options?: CacheManagerOptions): CacheManager;
interface CacheStats {
hits: number;
misses: number;
hitRate: number;
size: number;
maxSize: number;
}npm install bytekit// Importación específica (recomendado)
import { CacheManager } from "bytekit/cachemanager";
// Importación desde el índice principal
import { CacheManager } from "bytekit";💡 ¿Encontraste un error o tienes una sugerencia? Abre un issue o contribuye al proyecto.