Returns the cache files mtime or 0 if it does not exists

def cache_info(cache_dir, cache_key):
    """
    Returns the cache files mtime or 0 if it does not exists
    """
    filename = os.path.join(cache_dir, cache_key)
    return os.path.getmtime(filename) if os.path.exists(filename) else 0