Item12392: Add a "preload" plugin handler to the Foswiki plugin API.
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Engine
Sometimes a decision can be made very early whether to allow a request to proceed or not; for example, on the basis of server resources, or information from the request. At the moment the earliest a decision can be made by a plugin is in the
, which isn't early at al. By the time is is called the Store, the Prefs and the logged-in user are all set up - pointless, if a simple check is going to reject or shortcut the request in some way.
By splitting up some code in the
I was able to divide the plugin initialisation process so that plugins can be initiated very very early. This allows the addition of a new handler - I called it
- that can perform this sort of check.
All other functionality is identical, and code performance is not impacted measurably.
I propose to check this in for 1.2.0
for feature proposal.
If you want to try it, there's an implementation in the patch file attached.
- 13 Feb 2013
Some fixing in Item12440
- 18 Mar 2013
Correction to cure test failures
- 23 Mar 2013