def load_mappings(app):
 now = int(time.time())
 cache_time = (now - (app.config.intersphinx_cache_limit * 86400))
 env = app.builder.env
 if (not hasattr(env, 'intersphinx_cache')):
  env.intersphinx_cache = {}
 cache = env.intersphinx_cache
 update = False
 for (uri, inv) in app.config.intersphinx_mapping.iteritems():
  if (not inv):
   inv = posixpath.join(uri, INVENTORY_FILENAME)
  if (('://' not in inv) or (uri not in cache) or (cache[uri][0] < cache_time)):
   invdata = fetch_inventory(app, uri, inv)
   cache[uri] = (now, invdata)
   update = True
 if update:
  env.intersphinx_inventory = {}
  for (_, invdata) in cache.itervalues():
   if invdata:
    env.intersphinx_inventory.update(invdata)

def load_mappings ( app ) : now = int ( time . time ( ) ) cache_time = ( now - ( app . config . intersphinx_cache_limit * 86400 ) ) env = app . builder . env if ( not hasattr ( env , 'intersphinx_cache' ) ) : env . intersphinx_cache = { } cache = env . intersphinx_cache update = False for ( uri , inv ) in app . config . intersphinx_mapping . iteritems ( ) : if ( not inv ) : inv = posixpath . join ( uri , INVENTORY_FILENAME ) if ( ( '://' not in inv ) or ( uri not in cache ) or ( cache [ uri ] [ 0 ] < cache_time ) ) : invdata = fetch_inventory ( app , uri , inv ) cache [ uri ] = ( now , invdata ) update = True if update : env . intersphinx_inventory = { } for ( _ , invdata ) in cache . itervalues ( ) : if invdata : env . intersphinx_inventory . update ( invdata )
load name mappings encoded in command-line arguments .