<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def atlasdb_cache_zonefile_info( con=None, path=None ):
 """ Load up and cache our zonefile inventory from the database """

    global ZONEFILE_INV, NUM_ZONEFILES, ZONEFILE_INV_LOCK
    
    inv = None
    with ZONEFILE_INV_LOCK:
        inv_len = atlasdb_zonefile_inv_length( con=con, path=path )
        inv = atlas_make_zonefile_inventory( 0, inv_len, con=con, path=path )

        ZONEFILE_INV = inv
        NUM_ZONEFILES = inv_len

    return inv