Download the PHP package biigle/laravel-file-cache without Composer

On this page you can find all versions of the php package biigle/laravel-file-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-file-cache

File Cache

Fetch and cache files from local filesystem, cloud storage or public webservers in Laravel or Lumen.

The file cache is specifically designed for use in concurrent processing with multiple parallel queue workers.

Tests

Installation

Laravel

The service provider and FileCache facade are auto-discovered by Laravel.

Lumen

Add this to bootstrap/app.php:

To use the FileCache facade, enable $app->withFacades() and add the following to bootstrap/app.php:

Without facades, the file cache instance is available as app('file-cache').

Usage

Take a look at the FileCache contract to see the public API of the file cache. Example:

If the file URL specifies another protocol than http or https (e.g. mydisk://images/image.jpg), the file cache looks for the file in the appropriate storage disk configured at filesystems.disks. You can not use a local file path as URL (e.g. /vol/images/image.jpg). Instead, configure a storage disk with the local driver.

Configuration

The file cache comes with a sensible default configuration. You can override it in the file-cache namespace or with environment variables.

file-cache.max_file_size

Default: -1 (any size) Environment: FILE_CACHE_MAX_FILE_SIZE

Maximum allowed size of a cached file in bytes. Set to -1 to allow any size.

file-cache.max_age

Default: 60 Environment: FILE_CACHE_MAX_AGE

Maximum age in minutes of a file in the cache. Older files are pruned.

file-cache.max_size

Default: 1E+9 (1 GB) Environment: FILE_CACHE_MAX_SIZE

Maximum size (soft limit) of the file cache in bytes. If the cache exceeds this size, old files are pruned.

file-cache.path

Default: 'storage/framework/cache/files'

Directory to use for the file cache.

file-cache.timeout

Default: 5.0 Environment: FILE_CACHE_TIMEOUT

Read timeout in seconds for fetching remote files. If the stream transmits no data for longer than this period (or cannot be established), caching the file fails.

file-cache.prune_interval

Default '*/5 * * * *' (every five minutes)

Interval for the scheduled task to prune the file cache.

file-cache.mime_types

Default: [] (allow all types)

Array of allowed MIME types for cached files. Caching of files with other types will fail.

Clearing

The file cache is cleared when you call php artisan cache:clear.

Testing

The FileCache facade provides a fake for easy testing. The fake does not actually fetch and store any files, but only executes the callback function with a faked file path.


All versions of laravel-file-cache with dependencies

PHP Build Version
Package Version
Requires illuminate/console Version ^11.0
illuminate/filesystem Version ^11.0
illuminate/support Version ^11.0
symfony/finder Version ^7.0
guzzlehttp/guzzle Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package biigle/laravel-file-cache contains the following files

Loading the files please wait ....