/** * @react-native-iconify/turbo-cache * * Platform-aware caching via SDWebImage (iOS), Glide (Android), and an LRU * memory cache on web. * * Based on expo-image's caching architecture. */ import type { CacheOptions, NativeCacheModule } from "./types"; export { NativeDiskCache } from "./native"; export type { CacheOptions, NativeCacheModule } from "./types"; export { CacheError } from "./types"; /** * Uses native memory + disk caching on iOS and Android, and a JavaScript LRU * memory cache on web. * * This avoids Hermes "property is not writable" errors by eliminating * JavaScript object manipulation in the cache layer. */ export declare class TurboCache { private nativeCache; constructor(options?: CacheOptions, nativeModule?: NativeCacheModule); /** * Get a value from the platform cache * @param key - Cache key * @returns Cached value or null */ get(key: string): Promise; /** * Set a value in the platform cache * @param key - Cache key * @param data - Data to cache * @param ttl - Time-to-live in milliseconds */ set(key: string, data: T, ttl?: number): Promise; /** * Remove value from cache * @param key - Cache key */ remove(key: string): Promise; /** * Clear all cache entries (memory + disk) */ clear(): Promise; /** * Clear only memory cache (native layer) */ clearMemoryCache(): Promise; /** * Clear only disk cache (native layer) */ clearDiskCache(): Promise; /** * Get total cache size in bytes * @returns Size in bytes */ getSize(): Promise; } /** * Create a new TurboCache instance * @param options - Cache size and expiration options * @param nativeModule - Optional native module (for testing) * @returns TurboCache instance */ export declare function createCache(options?: CacheOptions, nativeModule?: NativeCacheModule): TurboCache; //# sourceMappingURL=index.d.ts.map