ocramius / ocra-cached-view-resolver
Cached view template path resolver to speed up the ZF2 view layer by avoiding stat calls
Fund package maintenance!
Ocramius
Installs: 84 608
Dependents: 3
Suggesters: 0
Security: 0
Stars: 58
Watchers: 5
Forks: 10
Open Issues: 8
Requires
- php: ~8.1.0 || ~8.2.0
- laminas/laminas-cache: ^3.9.0
- laminas/laminas-modulemanager: ^2.14.0
- laminas/laminas-mvc: ^3.6.0
- laminas/laminas-servicemanager: ^3.20.0
- laminas/laminas-view: ^2.25.2
Requires (Dev)
- doctrine/coding-standard: ^11.0.0
- laminas/laminas-cache-storage-adapter-memory: ^2.2.0
- phpunit/phpunit: ^9.5.27
- roave/infection-static-analysis-plugin: ^1.27.0
- vimeo/psalm: ^5.4.0
- 6.4.x-dev
- 6.3.x-dev
- 6.3.0
- 6.2.x-dev
- 6.2.0
- 6.1.x-dev
- 6.1.0
- 6.0.x-dev
- 6.0.0
- 5.2.x-dev
- 5.1.x-dev
- 5.1.0
- 5.0.x-dev
- 5.0.0
- 4.1.0
- 4.0.0
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.0.0
- 1.1.0
- 1.0.0
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-renovate/all-minor-patch
- dev-renovate/laminas-laminas-servicemanager-4.x
- dev-renovate/phpunit-phpunit-11.x
- dev-renovate/laminas-laminas-cache-storage-adapter-memory-3.x
- dev-renovate/laminas-laminas-cache-4.x
- dev-renovate/lock-file-maintenance
- dev-renovate/phpunit-phpunit-10.x
This package is auto-updated.
Last update: 2024-11-21 12:19:11 UTC
README
OcraCachedViewResolver is performance-oriented laminas/laminas-mvc
Module that increases performance
in your application by caching the process of resolving template names to template paths.
In laminas/laminas-mvc-skeleton
, the process of resolving template
paths causes a lot of stat calls (disk access). This module adds a cache layer to avoid that.
Installation
The recommended way to install ocramius/ocra-cached-view-resolver
is through
composer:
php composer.phar require \ ocramius/ocra-cached-view-resolver \ laminas/laminas-cache-storage-adapter-filesystem
You can pick any laminas/laminas-cache-storage-implementation
you want, as long as you provide one, and later configure it.
You can then enable the module in your config/application.config.php
by adding
'OcraCachedViewResolver'
to the 'modules'
section.
Configuration
Default configurations are provided in
config/ocra-cached-view-resolver.local.php.dist
.
You can copy it to your application's config/autoload
directory and remove the .dist
extension
from the file name, then adjust its contents to your needs.
Note that you will need to provide your own laminas/laminas-cache
adapter (pick one of your choice),
and configure it as service to be referenced in your copy of config/ocra-cached-view-resolver.local.php.dist
.