code: def get_object(table, id=None, condition=None, cache=False, fields=None, use_local=False,
                 engine_name=None, session=None):
      
      from uliweb import functions, settings
      
      model = get_model(table, engine_name)
          
      #if id is an object of Model, so get the real id value
      if isinstance(id, Model):
          return id
        
      if cache:
          if use_local:
              s = get_session(session)
              key = get_object_id(s.engine_name, model.tablename, id)
              value = s.get_local_cache(key)
              if value:
                  return value
          obj = model.get(id, condition=condition, fields=fields, cache=True)
          if use_local:
              value = s.get_local_cache(key, obj)
      else:
          obj = model.get(id, condition=condition, fields=fields)
      
      return obj
docs: Get obj in Local.object_caches first and also use get(cache=True) function if 
      not found in object_caches