[pLog-svn] dynamic plugins
Ahmad Saleh
ahmadfds at gmail.com
Sun Jun 3 08:56:27 EDT 2007
On 6/3/07, Jon Daley <plogworld at jon.limedaley.com> wrote:
>
> On Sun, 3 Jun 2007, Ahmad Saleh wrote:
> > Are there any body solve plugins problem with caching?
>
> Did you see the last conversation about it, maybe a couple months
> ago?
Yes, i see it.
I showed at least a partial solution, though I hadn't tried it yet,
> but Oscar said we are probably moving in the other direction - ie. making
> cached pages have even less load, where my solution would increase the
> load.
And I also have another solution, I want to share it with you,
so please till me if you have any note about it:
1) Add ($isDynamic = false) field in PluginBase class.
2) In function (getPlugins()) in PluginManager class loads only non dynamic
plugins and add another function (getDynamicPlugins()) that return only
dynamic plugins.
3) in BlogView class:
function render()
{
if( !$this->isCached() ) {
lt_include(
PLOG_CLASS_PATH.'class/data/plogcalendar.class.php' );
.
.
$plugins = $this->_pm->getPlugins();
foreach( $plugins as $name => $plugin ) {
$this->setValue( $name, $plugin );
}
+ } else {
+ $plugins = $this->_pm->getDynamicPlugins();
+ foreach( $plugins as $name => $plugin ) {
+ $this->setValue( $name, $plugin );
+ }
}
.
.
My guess is that the code paths will be too different to have a
> configuration option for people who want to give up the performance in
> order to be able to use {dynamic} with plugins.
>
> --
> Jon Daley
> http://jon.limedaley.com/
>
> Am I going to live life with a passion? Surrender to God -
> then see people as God sees them. Live life with abandon.
> -- Jubilee 2001
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>
Regards,
Ahmad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://limedaley.com/pipermail/plog-svn/attachments/20070603/1eaaa70c/attachment.htm
More information about the pLog-svn
mailing list