helingfeng/laravel-page-cache

There is no license information available for the latest version (1.0.5) of this package.

1.0.5 2019-05-23 09:49 UTC

This package is not auto-updated.

Last update: 2024-12-14 11:32:37 UTC


README

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

安装

使用 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