teepluss / fast
Fast is a robot making cache instead of your client.
Requires
- php: >=5.4.0
- illuminate/support: 4.2.*
This package is not auto-updated.
Last update: 2024-11-05 02:15:19 UTC
README
Fast is a robot making cache instead of your client.
Installation
To get the latest version of Theme simply require it in your composer.json
file.
"teepluss/fast": "dev-master"
You'll then need to run composer install
to download it and have the autoloader updated.
Once Theme is installed you need to register the service provider with the application. Open up app/config/app.php
and find the providers
key.
'providers' => array(
'Teepluss\Fast\FastServiceProvider',
)
Fast also ships with a facade which provides the static syntax for creating collections. You can register the facade in the aliases
key of your app/config/app.php
file.
'aliases' => array(
'Fast' => 'Teepluss\Fast\Facades\Fast',
)
Publish config using artisan CLI.
php artisan config:publish teepluss/fast
Basic usage
Remember your content in (x) seconds.
$content = Fast::expireInSecond(10)->remember('key-of-page', function() { $html = 'Your HTML Goes Here.' . rand(1, 1000); return $html; }); return $content;
Find out the content problem.
$content = Fast::debug(true)->expireInSecond(10)->remember('key-of-page', function() { $html = 'Your HTML Goes Here.' . rand(1, 1000); return $html; }); return $content;
Forget your page cache.
Fast::forget('key-of-page');
Flush all cache.
Fast::flush()
Working with artisan.
Forget cache.
php artisan fast:forget key-cache
Flush all cache.
php artisan fast:flush
Support or Contact
If you have any problems, Contact teepluss@gmail.com