Download the PHP package pteal79/mobile-file-cache without Composer
On this page you can find all versions of the php package pteal79/mobile-file-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pteal79/mobile-file-cache
More information about pteal79/mobile-file-cache
Files in pteal79/mobile-file-cache
Package mobile-file-cache
Short Description Offline-friendly remote file caching for NativePHP and Laravel.
License MIT
Informations about the package mobile-file-cache
Mobile File Cache
Offline-friendly remote file caching for Laravel 12, NativePHP 3.1, and Livewire 3.
Installation
Config
Usage
Observer example
Notes
- Full URLs are hashed including query parameters, so signed or versioned file URLs are cached independently.
MobileFileCache::get()returns the original URL until the queued download has completed.- Cached files are stored under the configured disk in the
cached_files/directory by default. - Only images and PDFs are cached by default through MIME validation.
- Files larger than 30 MB are skipped.
- The queue job supports configurable queue retries and HTTP retries.
file-cache:clean-upremoves aged entries using the configured retention period.
Testing
Allowed MIME types
By default the package caches PDFs and common image formats, including HEIC/HEIF (image/heic, image/heif).
Batched worker queue flow
MobileFileCache::cache($url) now creates a deduplicated pending request instead of dispatching one download job per URL.
MobileFileCache::hasPendingRequests() returns a boolean indicating whether pending cache requests exist. When pending requests are present, the package dispatches a unique CacheFileWorker job onto Laravel's default queue. The worker processes pending requests in batches and re-dispatches itself if more work remains.
New table: mobile_file_cache_pending_requests
This table stores outstanding cache requests, deduplicated by the full remote URL hash.
All versions of mobile-file-cache with dependencies
illuminate/contracts Version ^12.0
illuminate/database Version ^12.0
illuminate/filesystem Version ^12.0
illuminate/http Version ^12.0
illuminate/queue Version ^12.0
illuminate/support Version ^12.0