/**
 * Simple in-memory cache with TTL support
 */
export interface CacheEntry<T> {
    value: T;
    expiresAt: number;
}
export declare class Cache<T> {
    private cache;
    private defaultTTL;
    /**
     * @param defaultTTL Default time-to-live in milliseconds
     */
    constructor(defaultTTL?: number);
    /**
     * Get a value from the cache
     * @returns The cached value or undefined if not found or expired
     */
    get(key: string): T | undefined;
    /**
     * Set a value in the cache
     * @param key Cache key
     * @param value Value to cache
     * @param ttl Time-to-live in milliseconds (optional, uses default if not provided)
     */
    set(key: string, value: T, ttl?: number): void;
    /**
     * Check if a key exists and is not expired
     */
    has(key: string): boolean;
    /**
     * Delete a specific key from the cache
     */
    delete(key: string): boolean;
    /**
     * Clear all entries from the cache
     */
    clear(): void;
    /**
     * Remove all expired entries from the cache
     */
    cleanup(): void;
    /**
     * Get the number of entries in the cache (including expired ones)
     */
    get size(): number;
    /**
     * Get or compute a value
     * If the key exists in cache, return it. Otherwise, compute it, cache it, and return it.
     */
    getOrCompute(key: string, computeFn: () => Promise<T>, ttl?: number): Promise<T>;
    /**
     * Synchronous version of getOrCompute
     */
    getOrComputeSync(key: string, computeFn: () => T, ttl?: number): T;
}
/**
 * Create a cache key from multiple parts
 */
export declare function createCacheKey(...parts: (string | number | boolean | undefined | null)[]): string;
