PHP code example of wyrihaximus / react-http-middleware-response-cache
1. Go to this page and download the library: Download wyrihaximus/react-http-middleware-response-cache 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/ */
wyrihaximus / react-http-middleware-response-cache example snippets
$server = new Server([
/** Other middleware */
new ResponseCacheMiddleware(
new CacheConfiguration(
[
'/',
'/robots.txt',
'/favicon.ico',
'/cache/***', // Anything that starts with /cache/ in the path will be cached
'/api/???', // Anything that starts with /cache/ in the path will be cached (query is