Fast for Laravel 4
Fast is a robot making cache instead of your client., (*1)
Installation
To get the latest version of Theme simply require it in your composer.json
file., (*2)
"teepluss/fast": "dev-master"
You'll then need to run composer install
to download it and have the autoloader updated., (*3)
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., (*4)
'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., (*5)
'aliases' => array(
'Fast' => 'Teepluss\Fast\Facades\Fast',
)
Publish config using artisan CLI., (*6)
php artisan config:publish teepluss/fast
Basic usage
Remember your content in (x) seconds., (*7)
$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., (*8)
$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., (*9)
Fast::forget('key-of-page');
Flush all cache., (*10)
Fast::flush()
Working with artisan.
Forget cache., (*11)
php artisan fast:forget key-cache
Flush all cache., (*12)
php artisan fast:flush
If you have any problems, Contact teepluss@gmail.com, (*13)
, (*14)