Download the PHP package infusionweb/laravel-middleware-response-cache without Composer
On this page you can find all versions of the php package infusionweb/laravel-middleware-response-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download infusionweb/laravel-middleware-response-cache
More information about infusionweb/laravel-middleware-response-cache
Files in infusionweb/laravel-middleware-response-cache
Package laravel-middleware-response-cache
Short Description Provides caching of HTML pages in Laravel responses.
License MIT
Homepage https://github.com/infusionweb/laravel-middleware-response-cache
Informations about the package laravel-middleware-response-cache
Laravel HTML Response Cache Middleware
Provides caching of entire HTML responses in Laravel 5.
Installation
Via Composer
Laravel 5.1 Usage
Add the service provider
Register as route middleware
Apply HTML response cache to routes
The following will cache the gallery
route.
Apply HTML response cache to controllers
The following will apply all default profiles to all methods within the GalleryController
.
Laravel 5.2 Usage
Middleware can be registered the same as 5.1, or by the following method.
Add to route middleware group
Apply HTML response cache to routes
All routes using the web
middleware group will be cached.
Enable and configure response caching
The middleware will only cache HTML responses when explicitly enabled. This is to allow development systems to operate normally by default, while easily allowing production systems to cache HTML responses.
Publish the package config file
You may now enable response caching and change the default cache time by editing the config/response-cache.php
file.
Credits
License
The MIT License (MIT). Please see License File for more information.