def sync_list_settings():
 for (key, data) in frappe.cache().hgetall('_list_settings').iteritems():
  (doctype, user) = key.split('::')
  frappe.db.sql('insert into __ListSettings (user, doctype, data) values (%s, %s, %s)\n DCTB  DCTB  DCTB on duplicate key update data=%s', (user, doctype, data, data))

def sync_list_settings ( ) : for ( key , data ) in frappe . cache ( ) . hgetall ( '_list_settings' ) . iteritems ( ) : ( doctype , user ) = key . split ( '::' ) frappe . db . sql ( 'insert into __ListSettings (user, doctype, data) values (%s, %s, %s)\n DCTB  DCTB  DCTB on duplicate key update data=%s' , ( user , doctype , data , data ) )
sync from cache to database .