On 14 Jun 2011, at 20:24, Michael Hamann wrote: > 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. > I like this idea. <snip> > >> 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? > Its intended for when the plugin manager manages plugins. It either knows its installed a new plugin or can be given a function to scan the entire plugin directory. >> 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. I recall an issue with nfs based wikis where minimizing directory access was important. However, if the plugin list is retrieved from the config files, there is no need for a separate list in cache. The discussion point becomes whether or not, in a normal page request, a list built from the config files can be considered complete. For manually updated plugins, adding a facility to the plugin manager to build the list by scanning the plugin directory shouldn't be difficult. - Chris -- DokuWiki mailing list - more info at http://www.dokuwiki.org/mailinglist