@classmethod
def _get_client(cls, host, port, password, db):
    """
        Retrieves a connection pool from a class-local cache (or creates
        it if necessary), returns a Redis client instance that uses that
        pool.
        """
    try:
        import redis
    except ImportError:
        raise RuntimeError('no redis module found')
    else:
        cls.REDIS_VERSION = redis.__version__
    credentials = host, port, password, db
    pool = cls._connection_pool_cache.get(credentials, redis.ConnectionPool
        (host=host, port=port, password=password, db=db))
    cls._connection_pool_cache[credentials] = pool
    return redis.Redis(connection_pool=pool)
