def read_fmt(bib_name, bib_file):
 (cache_name, formatted_cache_name) = _cache_name(bib_name, bib_file)
 try:
  (meta_data, formatted_entries) = cache.read_global(formatted_cache_name)
 except:
  raise cache.CacheMiss()
 modified_time = os.path.getmtime(bib_file)
 if (modified_time > meta_data['cache_time']):
  raise cache.CacheMiss()
 if ((meta_data['version'] != _VERSION) or any(((meta_data[s] != get_setting(('cite_' + s))) for s in ['panel_format', 'autocomplete_format']))):
  print 'Formatting string has changed, updating cache...'
  (current_time, bib_entries) = cache.read_global(cache_name)
  formatted_entries = _create_formatted_entries(formatted_cache_name, bib_entries, current_time)
 return formatted_entries

def read_fmt ( bib_name , bib_file ) : ( cache_name , formatted_cache_name ) = _cache_name ( bib_name , bib_file ) try : ( meta_data , formatted_entries ) = cache . read_global ( formatted_cache_name ) except : raise cache . CacheMiss ( ) modified_time = os . path . getmtime ( bib_file ) if ( modified_time > meta_data [ 'cache_time' ] ) : raise cache . CacheMiss ( ) if ( ( meta_data [ 'version' ] != _VERSION ) or any ( ( ( meta_data [ s ] != get_setting ( ( 'cite_' + s ) ) ) for s in [ 'panel_format' , 'autocomplete_format' ] ) ) ) : print 'Formatting string has changed, updating cache...' ( current_time , bib_entries ) = cache . read_global ( cache_name ) formatted_entries = _create_formatted_entries ( formatted_cache_name , bib_entries , current_time ) return formatted_entries
reads the cache file of a bibliography file .