Advanced Multi-Tier Cache Engine
Memory Cache + Persistent SessionStorage + IndexedDB with TTL.
Overview
DriveLoader utilizes an LRU Memory cache backed by IndexedDB persistent storage. This allows instant offline resolution for previously visited media assets.
Code Example
caching.tsx
| 1 | import { getCacheStats, clearCache, inspectCache } from '@driveloader/react'; |
| 2 | |
| 3 | const stats = getCacheStats(); |
| 4 | console.log('Hit rate:', stats.hitRate + '%'); |
Best Practices
- •Do not clear cache manually unless explicitly providing a 'Reset Application' setting to users.
Performance Notes
Cache throughput exceeds 10,000 ops/sec, completely bypassing network roundtrips for resolved endpoints.
