PHP code example of tsaiyihua / laravel-pagecache

1. Go to this page and download the library: Download tsaiyihua/laravel-pagecache library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

tsaiyihua / laravel-pagecache example snippets

 artisan vendor:publish --tag=pagecache

         'pages' => [
             'driver' => 'local',
             'root' => env('PAGE_CACHE_DISK', storage_path('app/pages')),
         ],
 

    'pageCache' => \TsaiYiHua\Cache\Http\Middleware\PageCache::class
 

    PAGE_CACHE_ENABLE=true
    PAGE_CACHE_ALIVE=1296000
    PAGE_CACHE_URL_PATTERN=/^(http.*)\/\/([^\/]+)[\/]?([^\?]+)?\??(.*)?/
    PAGE_CACHE_PARAMS=l,p
    PAGE_CACHE_DELAY=30
    PAGE_CACHE_OWNER=nobody
    PAGE_CACHE_GROUP=nobody    
    PAGE_CACHE_LOG=false
    PAGE_CACHE_LOG_DAYS=7
 artisan pagecache:clear
 artisan pagecache:refresh {url}
 artisan pagecache:info {url}
 artisan pagecache:info stat {--date= : stat date}