[dokuwiki] Re: Farm support for plugin manager

  • From: Michael Hamann <michael@xxxxxxxxxxxxxxxx>
  • To: dokuwiki <dokuwiki@xxxxxxxxxxxxx>
  • Date: Tue, 14 Jun 2011 21:24:56 +0200

Hi,

Excerpts from Christopher Smith's message of 2011-06-14 15:42:40 +0200:
> On 14 Jun 2011, at 08:08, Andreas Gohr wrote:
> >> Have you considered using the config cascade to hold 'master'
> >> lists.  One for the animal and one for the farmer (or as many as
> >> the admin wants) - equivalent to local & protected in the normal
> >> scheme of things.  Those files being stored in appropriate conf
> >> directories where they are human editable for those people who
> >> don't like allowing configurations to be auto-updated.

What about simply using the existing configuration files and just add a
enabled/disabled boolean setting for each plugin?

There could be a default state and then the farmer and the animals could
each disable or enable plugins as they need. This could also make it
possible to e.g. disable a plugin by default and still make it possible
to enable it in an animal and at the same time force the disabling of
certain plugins globally.

> > This seems the most useful way. BTW. I'd prefer having a list of
> > disabled plugins instead of a list of enabled plugins that has to be
> > updated everytime a new plugin is installed. Or are there any good
> > reasons it has to be reversed?

I think, too, that this makes sense, as otherwise it will break the
expectation of users who install (or create) plugins manually and expect
them to work as they do now.

The plugin manager can still disable plugins even before they are
installed so they are installed disabled.

> A white list of enabled plugins, removes the need to scan the plugin
> directory for each page request.

But how do you recognize new plugins then?

> With a complete list, every plugin and either enabled/disabled in
> config, it could be efficient to keep the final resolved list in
> _cache.  And so avoid both scanning the plugin directory and
> processing the plugin lists on every page view.  To avoid issues with
> manual list updating, I think this would require a config option to
> allow or have the cache dependent on the files in the config cascade
> (which puts back some of the file accesses on each page view).

I'm not sure if the benefit of such a list is really that large as a)
you need to be able to recognize new plugins and b) you still need to
scan the plugin directories for the files that need to be loaded. You
can of course cache both but then you need a way to detect new files
etc.

Michael
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: