PHP code example of waavi / responsecache

1. Go to this page and download the library: Download waavi/responsecache 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/ */

    

waavi / responsecache example snippets


// config/app.php

'providers' => [
    ...
    \Waavi\ResponseCache\ResponseCacheServiceProvider::class,
];

// config/app.php

'aliases' => [
    ...
   'ResponseCache' => \Waavi\ResponseCache\Facades\ResponseCache::class,
];

// app/Http/routes.php

Route::get('/', ['middleware' => 'cache', 'uses' => 'HomeController@home']);

\ResponseCache::clear();