import { AssetType, CacheEntry } from '../types.mjs'; /** * Utility functions for cache operations */ /** * Determine the asset type from a URL or content type * @param url URL of the asset * @param contentType Optional content type * @returns Asset type */ declare function determineAssetType(url: string, contentType?: string): AssetType; /** * Check if an asset should be cached based on its type and size * @param url URL of the asset * @param size Size of the asset in bytes * @param contentType Optional content type * @param maxSize Maximum size for cacheable assets * @returns Whether the asset should be cached */ declare function shouldCacheAsset(url: string, size: number, contentType?: string, maxSize?: number): boolean; /** * Create a cache entry for an asset * @param data Asset data * @param url URL of the asset * @param contentType Optional content type * @param options Cache options * @returns Cache entry */ declare function createCacheEntry(data: T, url: string, contentType?: string, options?: { ttl?: number; tags?: string[]; version?: string; }): CacheEntry; /** * Check if a cache entry has expired * @param entry Cache entry * @returns Whether the entry has expired */ declare function hasExpired(entry: CacheEntry): boolean; /** * Format a size in bytes to a human-readable string * @param bytes Size in bytes * @returns Human-readable size string */ declare function formatSize(bytes: number): string; /** * Log a debug message if debug mode is enabled * @param message Message to log * @param args Additional arguments */ declare function debugLog(message: string, ...args: any[]): void; export { createCacheEntry, debugLog, determineAssetType, formatSize, hasExpired, shouldCacheAsset };