Shopify/identity_cache — pull request #183 by dylanahsmith (2014-11-11 20:01:30+00:00)
Title: Stop connecting to database in IdentityCache.should_use_cache?

@fbogsany & @Sirupsen for review

## Problem

Identity cache was connecting to the database when calling `IdentityCache.should_use_cache?` because it would checkout the connection to find out if there was any open transactions on it.

## Solution

Check if a connection is checked out on the pool before checking for open transactions on the connection itself.