This Package imitates the default laravel app cache functionality, where demanding processes that calculate registered data (config, providers, routes), are cached there in order to be used in each app bootstrap, avoiding recalculation time
-
Install package
composer require geo-sot/laravel-app-cache-utilizer
-
Publish assets
php artisan vendor:publish --provider=GeoSot\AppCache\ServiceProvider
This will publish all files:
- config -> app-cache-utilizer.php
Or publish specific tags
* get(string $key, array $default = []): array
* has(string $key): bool
* add(string $key, array $data, bool $force = false): bool
* remember(string $key, Closure $callback): array // saves given callback result (if is not saved already), and returns the saved data
* forget(string $key): bool // clear the given cached file, if exists
* clear(): bool // clear all package's cached files