Download the PHP package klimis/cachemiddleware without Composer
On this page you can find all versions of the php package klimis/cachemiddleware. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download klimis/cachemiddleware
More information about klimis/cachemiddleware
Files in klimis/cachemiddleware
Download klimis/cachemiddleware
More information about klimis/cachemiddleware
Files in klimis/cachemiddleware
Vendor klimis
Package cachemiddleware
Short Description Cache Laravel controllers' response
License MIT
Package cachemiddleware
Short Description Cache Laravel controllers' response
License MIT
Please rate this library. Is it a good library?
Informations about the package cachemiddleware
Cache Middleware
(For Laravel Controllers)
Installation
Composer:
"klimis/cachemiddleware": "^1.0"
- Register in Kernel.php. Eg
'cache' => \Klimis\CacheMiddleware\Middleware\CacheMiddleware::class
Usage
- Set methods to be cached in Controllers. Add to any controller
public $cache = ['getPage'];
to cache forever orpublic $cache = ['getPage' => 60] ;
for cache with timeout - Use header
Api-Disable-Cache = 1
to force disable cache for request - Check response header
X-Is-From-Coin-Cache
to check if response is coming from cache - Set env
DISABLE_CACHE
to true to disable all cache - 1.3.1
- Added cacheExceptions eg
public $cacheExceptions = [ 'getPage' => [ "page_type" => ["data-hub-explorer","test"] ] ];
. Works for page_type only at the moment
- Set methods to be cached in Controllers. Add to any controller
TODO
- Move controller methods to middleware.
- More Unit test
- Create job for cleaning cache
- Hash key
All versions of cachemiddleware with dependencies
PHP Build Version
Package Version
No informations.
The package klimis/cachemiddleware contains the following files
Loading the files please wait ....