query module scoping
Knot 1.6 supports global modules and per-zone modules. Global modules are defined in zones
section and one instance of the module handles all requests. Modules defined in an individual zone
sections handle requests in scope of that zone.
Knot 2.0 introduced templates, which make the scoping more complicated. At the moment, modules defined in the default template are equivalent to global modules in 1.6. Modules defined in zones or any non-default template are instantiated per zone. This creates inconsistency between the default and a non-default template: modules defined in default template cannot be instantiated per-zone.
Ideas:
- We can add a new section to define global modules.
- Modules could define supported scope(s) for the instance (global, template, zone). And the desired scope could be indicated in the config.
Questions:
- Will the zone/template module override global/template modules?
- What about global/template/zone module ordering?