Solve a stupid bug in 00447c2

When I added support for "socket_cache => undef" we'd actually always
define $cache_key, but $socket_cache would be undef, we'd then
autovivify it to an anonyomus {}.

We'd throw it away right afterwards, but s/exists/defined/ here allows
us to skip some work.