In-Memory Caching & Metrics
LRU capacity eviction and TTL expiration with real-time statistics.
caching.tsx
| 1 | import { getCacheStats, clearCache } from '@driveloader/react'; |
| 2 | |
| 3 | const stats = getCacheStats(); |
| 4 | console.log(stats.hitRate, stats.cacheHits); |
| 5 | clearCache(); |
Usage Notes
Default TTL is 1 hour per resolved CDN URL.
