`describe` cache shouldn’t create all connections
Resolves #48
Thanks for providing a patch for this issue. As this tends to be more like a bugfix, can you please submit against the 1.0 branch and use long array syntax. 1.0 was still PHP <5.4.
http://li3.me/development#bugs
Just had a deeper look into the issue. Wouldn't disabling autoCreate here, lead to none of the connections having schema caching enabled?
You're right. The alternative (previous) approach initiated every connection on every action, though.
I'm not sure how to tackle this yet. The problem lies within the fact that autoConnect defaults to true, leading Connections::get($name) to initiate the connection, regardless of whether or not it's being used for that action. There has to be a way to set autoConnect to false through Connections::get(). I thought it was [ 'config' => [ 'autoConnect' => false ] ] but that didn't appear to work.
Sorry for not getting back earlier. Yes, there's no obvious bug fix here, that can be applied to just this repo's code. Looks like we need to dig deeper and probably patch Connections.