Closed jschreuder closed 11 years ago
Still thinking of a way to handle this...not entirely sure yet.
Would it make sense to keep some sort of framework level module cache? Perhaps you could glob the modules directory and make a hash of it... then based on that hash create a cached routes file to be looked up for non-active module requests? Seems like an ugly work-around... but it's better than always loading each routes file on every request. That's assuming you want to route to modules that haven't even been added on "this" request...
That had been removed in the past, and for a reason. Have you properly tested this?
It might also conflict now with the way module routes are loaded in the request itself, that contains additional logic. I suspect that no longer works because the module routes will already be present?
What was the reason for the removal? I will take another look this afternoon. As it is I think you may be right, it is probably adding double routes now when routing to a module. However, this doesn't "break" it right now...just an issue that needs fixed.
I am reopening the issue until this is resolved.
Good question, it's been a long time ago (commit history stops when you created submodules, and it was before that)
I have rolled back this commit and moved to the v1.1-dev milestone while we figure out what implications this has on the system as a whole.
Ref https://github.com/fuel/core/commit/8f693945a0d64b9beac4a00c792f77428f6bee0d
Currently Module routes are only loaded for active modules, shouldn't we have these routes available for all loaded modules? Including those loaded through
Fuel::add_module()
? Not for normal routing of course, but to support reversed routing for them.Also, I don't think there are currently any docs on this and as I've never used it I'm not really the person to write those.
Here's the forum issue where this became a point: http://www.fuelphp.com/forums/topics/view/2409