def saveNameCacheToDb():
 cache_db_con = db.DBConnection('cache.db')
 for (name, indexer_id) in nameCache.iteritems():
  cache_db_con.action('INSERT OR REPLACE INTO scene_names (indexer_id, name) VALUES (?, ?)', [indexer_id, name])

def saveNameCacheToDb ( ) : cache_db_con = db . DBConnection ( 'cache.db' ) for ( name , indexer_id ) in nameCache . iteritems ( ) : cache_db_con . action ( 'INSERT OR REPLACE INTO scene_names (indexer_id, name) VALUES (?, ?)' , [ indexer_id , name ] )
commit cache to database file .