News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen:
Caching your ZF2 merged configuration
June 19, 2013 @ 09:43:28

Rob Allen has a a new post to his site today showing how you can cache the merged settings from all of your configuration files combined in a Zend Framework v2 application.

Zend Framework 2's ModuleManager has the ability to cache the merged configuration information for your application. This is very useful as it allows you to separate out your configuration within the config/autoload directory into logical files without worrying about the performance implications of lots of files.

There's some ZF2 configuration options that tell it to cache this data once it's loaded the first time, but he notes one issue with this - caching in development. It can be annoying when you make a change and nothing happens because it's cached. To prevent this he shows you how to only cache if the application is marked as in production (based on the "APPLICATION_ENV"). Separate main configuration files are made for each environment, one that caches and one (for dev) that doesn't.

0 comments voice your opinion now!
cache merged configuration zendframework2 tutorial production development

Link: http://akrabat.com/zend-framework-2/caching-your-zf2-merged-configuration

blog comments powered by Disqus

Similar Posts

Dan Scott\'s Blog: Book Review - No Nonsense XML Web Development With PHP (Build Your Own)

Chris Hartjes' Blog: Don’t Fear The Command Line: Using CakePHP Shells

DZone.com: Creating a virtual server with Vagrant: a practical walkthrough

Linode Library: Deploy High Performance Drupal Sites with Mercury on Ubuntu 10.04 (Lucid)

Devshed: The Basics of Using the Prototype Pattern with PHP 5


Community Events

Don't see your event here?
Let us know!


introduction version api application performance symfony2 php7 opinion framework release community extension series example podcast interview library voicesoftheelephpant conference laravel

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework