https://github.com/geosot/laravel-application-cache-utilizer
https://github.com/geosot/laravel-application-cache-utilizer
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/geosot/laravel-application-cache-utilizer
- Owner: GeoSot
- License: mit
- Created: 2022-01-13T23:48:07.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-09T07:52:54.000Z (over 2 years ago)
- Last Synced: 2025-02-23T11:31:14.547Z (over 1 year ago)
- Language: PHP
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel app cache utilizer
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
* [Installation](#installation)
* [Available Methods](#available_methods)
1. Install package
```bash
composer require geo-sot/laravel-app-cache-utilizer
```
3. Publish assets
```bash
php artisan vendor:publish --provider=GeoSot\AppCache\ServiceProvider
```
This will publish all files:
* config -> app-cache-utilizer.php
Or publish specific tags
## Available Methods:
```php
* 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
```