DriveLoader Logo
DriveLoaderv1.2.0
Docs/Advanced Multi-Tier Cache Engine

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
1import { getCacheStats, clearCache, inspectCache } from '@driveloader/react';
2
3const stats = getCacheStats();
4console.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.

Related APIs