#NEWLINE# def get_id( engine , tablename , id = 0 , table_prefix = False ) : #NEWLINE# #INDENT# from uliweb import settings #NEWLINE# table = functions . get_table ( tablename ) #NEWLINE# d = { #NEWLINE# #INDENT# 'engine' : engine , #NEWLINE# 'tableid' : table . id , #NEWLINE# 'id' : str ( id ) , #NEWLINE# 'tablename' : table_prefix , #NEWLINE# #UNINDENT# } #NEWLINE# if table_prefix : #NEWLINE# #INDENT# format = settings . get_var ( 'OBJCACHE/table_format' , 'OC:%(engine)s:%(tableid)d:' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# format = settings . get_var ( 'OBJCACHE/key_format' , 'OC:%(engine)s:%(tableid)d:%(id)s' ) #NEWLINE# #UNINDENT# return ( format % d )