« Return to Thread: Zend_Loader_PluginLoader example code suggestion

Re: Zend_Loader_PluginLoader example code suggestion

by John Lamb :: Rate this Message:

Reply to Author | View in Thread

On Thu, Mar 26, 2009 at 11:16:51AM -0400, Matthew Weier O'Phinney wrote:
> To include it, you only need to know that the file exists. The line to
> setIncludeFileCache() can actually be omitted once you've populated the
> cache well. I certainly wouldn't make is_writable() a requirement for
> loading from it.
>
> That said... I should probably put an is_writable() check into
> _appendCache() and throw an exception if it's not.
>

Could the section which mentions disabling the cache be updated to
explain this?

How about something like this, instead of the bit which starts "During
Development":
Once the cache has been populated you no longer need to update it using
the setIncludeFileCache call, so you may wish to disable these updates.
By continuing to include the cache file you will still get all of the
performance benefits.

One option is to use a configuration key for determining whether or not
the plugin loader should update the cache. You can then opt to only
update the cache when your code has changed.


 « Return to Thread: Zend_Loader_PluginLoader example code suggestion