ctw / ctw-middleware-pagecache
This PSR-15 middleware provides full page caching for Mezzio applications.
4.0.0
2024-06-18 06:02 UTC
Requires
- php: ^8.3
- ctw/ctw-middleware: ^4.0
- laminas/laminas-cache: ^3.1
- laminas/laminas-cache-storage-adapter-filesystem: ^2.0
- laminas/laminas-diactoros: ^2.11
- mezzio/mezzio-fastroute: ^3.1
- mezzio/mezzio-session: ^1.4
- psr/container: ^1.0 || ^2.0
Requires (Dev)
- ctw/ctw-qa: ^4.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^1.7
- phpstan/phpstan-phpunit: ^1.1
- phpstan/phpstan-strict-rules: ^1.3
- phpunit/phpunit: ^10.0
- squizlabs/php_codesniffer: ^3.6
- symfony/var-dumper: ^7.0
This package is auto-updated.
Last update: 2024-10-18 06:51:52 UTC
README
⚠️ This component is under heavy development. Do not (yet) use it in a production environment.
$ composer require ctw/ctw-middleware-pagecache
Intro
middlewares/utils provides utility classes for working with PSR-15.
Installation
Install the middleware using Composer:
$ composer require ctw/ctw-middleware-pagecache
Standalone Example
// standalone example
Example in Mezzio
The middleware has been extensively tested in Mezzio.
After using Composer to install, simply make the following changes to your application's configuration.
In config/config.php
:
$providers = [ // [..] \Ctw\Middleware\PageCacheMiddleware\ConfigProvider::class, // [..] ];
In config/pipeline.php
:
use Ctw\Middleware\PageCacheMiddleware\PageCacheMiddleware; use Mezzio\Application; use Mezzio\MiddlewareFactory; use Psr\Container\ContainerInterface; return function (Application $app, MiddlewareFactory $factory, ContainerInterface $container): void { // [..] $app->pipe(PageCacheMiddleware::class); // [..] };