def cache_local_file(path):
 if (not os.path.exists(path)):
  return ''
 path_cached = is_cached(path)
 if path_cached:
  path_hash = hash_file(path)
  path_cached_hash = hash_file(path_cached)
  if (path_hash['hsum'] == path_cached_hash['hsum']):
   return path_cached
 return _client().cache_local_file(path)

def cache_local_file ( path ) : if ( not os . path . exists ( path ) ) : return '' path_cached = is_cached ( path ) if path_cached : path_hash = hash_file ( path ) path_cached_hash = hash_file ( path_cached ) if ( path_hash [ 'hsum' ] == path_cached_hash [ 'hsum' ] ) : return path_cached return _client ( ) . cache_local_file ( path )
cache a local file on the minion in the localfiles cache cli example: .