def get_cache(cache_item, config):
    """ returns cached item  """
    dpath = config.get('cache', 'cache_dir')
    inv = {}
    try:
        cache = open('/'.join([dpath, 'inventory']), 'r')
        inv = cache.read()
        cache.close()
    except IOError as e:
        pass
    return inv
