Skip to content

freedoomcode/laravel-page-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-page-cache

页面静态文件缓存,加快网站访问速度

安装

使用 Composer 安装

composer require  helingfeng/laravel-page-cache 1.0.5
php artisan vendor:publish

路由文件中使用

在需要缓存的路由中添加page_cache中间件

Route::group(['middleware' => ['page_cache']], function($router){
    $router->get('page-demo', function () {
            return '<h2>this page is cached.</h2>';
    });
});

缓存示例

访问:https://youdomain.com/page-demo

About

页面静态文件缓存,加快网站访问速度

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages