View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFPROP:Proposal Zone Template}

{zone-data:component-name}
Zend_Application_Bootstrap_BootstrapAbstract
{zone-data}

{zone-data:proposer-list}
[Andrew Stephanoff|mailto:andrew.stephanoff@gmail.com]
{zone-data}

{zone-data:liaison}
TBD
{zone-data}

{zone-data:revision}
1.0 - 1 January 2008: Initial Draft.
{zone-data}

{zone-data:overview}
Patch for Bootstrap which allow to use plugin cache before bootstrap starting.
{zone-data}

{zone-data:references}
* [Getting Better Performance for Plugins|http://zendframework.com/manual/1.11/en/zend.loader.pluginloader.html#zend.loader.pluginloader.performance]
{zone-data}

{zone-data:requirements}
No requirements
{zone-data}

{zone-data:dependencies}
* Zend_Loader_PluginLoader
{zone-data}

{zone-data:operation}
This patch is allow to setup cache filename for plugins in configuration file.
{zone-data}

{zone-data:milestones}
Not defined
{zone-data}

{zone-data:class-list}
* Zend_Application_Bootstrap_BootstrapAbstract
{zone-data}

{zone-data:use-cases}
||UC-01||
application.ini

pluginCache = "path/to/pluginCache/filename.php"

{zone-data}

{zone-data:skeletons}
Patch for Zend_Application_Bootstrap_BootstrapAbstract
{code}
Index: library/Zend/Application/Bootstrap/BootstrapAbstract.php
===================================================================
--- library/Zend/Application/Bootstrap/BootstrapAbstract.php (revision 23390)
+++ library/Zend/Application/Bootstrap/BootstrapAbstract.php (working copy)
@@ -122,6 +122,18 @@
$methods[$key] = strtolower($method);
}

+ if (array_key_exists('plugincache', $options)) {
+ $filename = $options['plugincache'];
+ if (is_readable($filename)) {
+ include $filename;
+ }
+ if (is_writable($filename)
+ || (!file_exists($filename) && is_writable(dirname($filename))))
+ {
+ Zend_Loader_PluginLoader::setIncludeFileCache($filename);
+ }
+ }
+
if (array_key_exists('pluginpaths', $options)) {
$pluginLoader = $this->getPluginLoader();
{code}
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>