def retrieve_object(cache, template, indexes):
    keys = []
    with cache as redis_connection:
        pipe = redis_connection.pipeline()
        for (result_key, redis_key_template) in template.items():
            keys.append(result_key)
            pipe.get(redis_key_template % indexes)
        results = pipe.execute()
    return None if None in results else dict(zip(keys, results))
Retrieve an object from Redis using a pipeline.
dataset/ETHPy150Open refinery29/chassis/chassis/services/cache.py/retrieve_object