Why isn't IRouteProvider not an ISingletonDependency?

Topics: Core
Developer
Mar 28, 2013 at 10:56 AM
Since route providers are tied to a tenant for its whole life time why aren't they implementing ISingletonDependency?
Developer
Mar 29, 2013 at 5:28 PM
Perhaps they could be singletons, but they don't need to be as they are stored in a list of an IOrchardShell instance, which is tied to the "shell" lifetime scope.
Developer
Mar 30, 2013 at 11:51 PM
There is also an injection of them in DefaultAliasService and that means that all route providers will be instantiated for every request, what seems unnecessary. I'll open an issue about this.