GeoSot / laravel-application-cache-utilizer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Install package

    composer require geo-sot/laravel-app-cache-utilizer
  2. 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

About

License:MIT License


Languages

Language:PHP 100.0%