cakedc / cakephp-cached-routing
Cached RoutingMiddleware for CakePHP 5.0+
Installs: 91 560
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 6
Forks: 1
Open Issues: 0
Type:cakephp-plugin
Requires
- php: >=8.1
- cakephp/cakephp: ^5.0.0
Requires (Dev)
- cakephp/cakephp-codesniffer: ^5.0
- phpunit/phpunit: ^10.1.0
- vimeo/psalm: ^5.15
This package is auto-updated.
Last update: 2024-12-19 17:48:29 UTC
README
After deprecation of the cache option in RoutingMiddleware in CakePHP 4.4+ and removal in CakePHP 5.0, the feature is extracted here in case you still want to use it to speed up your routes loading when your routes do not include non-serializable contents.
This plugin provides a replacement for the RoutingMiddleware to allow caching of the route collection.
Installation
composer require cakedc/cakephp-cached-routing
- Replace RoutingMiddleware reference in your
Application::middleware
function to
// ... ->add(new \CakeDC\CachedRouting\Routing\Middleware\CachedRoutingMiddleware($this, '_cake_routes_')) // ...
- Add the
_cake_routes_
cache settings in yourconfig/app_local.php
.
Requirements
- CakePHP 5.0+
- PHP 8.1+
Support
For bugs and feature requests, please use the issues section of this repository.
Commercial support is also available, contact us for more information.
Contributing
This repository follows the CakeDC Plugin Standard. If you'd like to contribute new features, enhancements or bug fixes to the plugin, please read our Contribution Guidelines for detailed instructions.
License
Copyright 2023 Cake Development Corporation (CakeDC). All rights reserved.
Licensed under the MIT License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.