Hacker News new | ask | show | jobs
by TwoSheds 5455 days ago
It's not really a singleton if it returns an instance per session instead of a global one.
1 comments

Yeah, its not really at true singleton in the dangerous sense in the context of a webserver, when you have a separate copy of the environment for each HTTP connection. It wouldn't be a singleton unless the same state could be accessed by different HTTP sessions.

I haven't come across a web framework that enables this, as you might expect; there's no good reason to do so.