teepluss / fast
Fast 是一个创建缓存而不是您的客户端的机器人。
dev-master
2014-09-16 04:37 UTC
Requires
- php: >=5.4.0
- illuminate/support: 4.2.*
This package is not auto-updated.
Last update: 2024-09-24 01:41:07 UTC
README
Fast 是一个创建缓存而不是您的客户端的机器人。
安装
要获取主题的最新版本,只需在您的 composer.json
文件中引入它。
"teepluss/fast": "dev-master"
然后您需要运行 composer install
来下载它并更新自动加载器。
一旦安装了主题,您需要将服务提供者注册到应用程序中。打开 app/config/app.php
并找到 providers
键。
'providers' => array(
'Teepluss\Fast\FastServiceProvider',
)
Fast 还附带了一个门面,提供了创建集合的静态语法。您可以在 app/config/app.php
文件的 aliases
键中注册门面。
'aliases' => array(
'Fast' => 'Teepluss\Fast\Facades\Fast',
)
使用 artisan CLI 发布配置。
php artisan config:publish teepluss/fast
基本用法
记住您的(x)秒内的内容。
$content = Fast::expireInSecond(10)->remember('key-of-page', function() { $html = 'Your HTML Goes Here.' . rand(1, 1000); return $html; }); return $content;
找出内容问题。
$content = Fast::debug(true)->expireInSecond(10)->remember('key-of-page', function() { $html = 'Your HTML Goes Here.' . rand(1, 1000); return $html; }); return $content;
忘记您的页面缓存。
Fast::forget('key-of-page');
清除所有缓存。
Fast::flush()
与 artisan 一起工作。
忘记缓存。
php artisan fast:forget key-cache
清除所有缓存。
php artisan fast:flush
支持或联系
如果您有任何问题,请联系 teepluss@gmail.com