def update_list_settings(doctype, list_settings, for_update=False):
 if for_update:
  current = json.loads(list_settings)
 else:
  current = json.loads(get_list_settings(doctype, for_update=True))
  if isinstance(current, basestring):
   current = {}
  current.update(list_settings)
 frappe.cache().hset('_list_settings', '{0}::{1}'.format(doctype, frappe.session.user), json.dumps(current))

def update_list_settings ( doctype , list_settings , for_update = False ) : if for_update : current = json . loads ( list_settings ) else : current = json . loads ( get_list_settings ( doctype , for_update = True ) ) if isinstance ( current , basestring ) : current = { } current . update ( list_settings ) frappe . cache ( ) . hset ( '_list_settings' , '{0}::{1}' . format ( doctype , frappe . session . user ) , json . dumps ( current ) )
update list settings in cache .