Ionic cache service for files (images, videos, docs) that downloads and stores files in the device's local cache directory using Ionic Native File and File Transfer plugins. Latest version is 2.0.48, with infrequent releases. It provides a simple provider (`FileCacheProvider`) that wraps file caching with configurable TTL and enabling/disabling. Designed specifically for Ionic/Cordova apps, not for browser or React Native. Alternatives like `cordova-plugin-file-transfer` or `@ionic-native/file` require more boilerplate.
npm install ionic-file-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures FileCacheProvider with caching enabled and 1-hour TTL, then caches a file URL and updates a display URL.
npm install @ionic-native/file @ionic-native/file-transfer
Add File and FileTransfer to your @NgModule providers array.
Use 60 * 60 * 1000 for 1 hour, not 3600.
Only use this package in Ionic/Cordova apps on a real device or emulator.
Ensure setEnableCache(true) is called before calling cachedFile().
Add FileCacheProvider to providers array in app.module.ts or the module where it's used.
Install @ionic-native/file and add File to NgModule providers.
Install @ionic-native/file-transfer and add FileTransfer to NgModule providers.