dev-master
9999999-devCustom static caching
MIT
The Requires
- php >=5.6.0
- laravel/framework ~5.2
by Andrei Zakharkin
php caching
Wallogit.com
2017 © Pedro Peláez
Custom static caching
Custom static cache, (*1)
Laravel 5 is released!!, (*2)
| Laravel | custom-static-caching |
|---|---|
| 5.2.x | dev-master |
Download via composer., (*3)
composer require andreizakharkin/custom-static-caching:dev-master
Register the service provider with your application., (*4)
Open config/app.php and find the providers key. Add CustomStaticCacheServiceProvider to the array., (*5)
...
Zakharkin\CustomStaticCache\CustomStaticCacheServiceProvider::class,
...
Publish vendor config, (*6)
php artisan vendor:publish --provider="Zakharkin\CustomStaticCache\CustomStaticCacheServiceProvider" --tag="config"
There are two main functions that helps you to use static caching., (*7)
checkAndShow() - function that can check and render the cache file, (*8)
save() - function that saves a cache file, (*9)
You can use this functions in anywhere places of your application. The only rule is need to be followed is that the checkAndShow() function must be triggered, after the autoload is completed, (*10)
... require __DIR__.'/../bootstrap/autoload.php'; \Zakharkin\CustomStaticCache\CustomStaticCache::getInstance()->checkAndShow(); ... $kernel->terminate($request, $response); \Zakharkin\CustomStaticCache\CustomStaticCache::getInstance()->save();
Custom static caching
MIT
php caching