@Profiler.profile
def test_core_query_caching(n):
 cache = {}
 ins = Customer.__table__.insert()
 for i in range(n):
  with engine.begin() as conn:
   conn.execution_options(compiled_cache=cache).execute(ins, dict(name=('customer name %d' % i), description=('customer description %d' % i)))

@ Profiler . profile def test_core_query_caching ( n ) : cache = { } ins = Customer . __table__ . insert ( ) for i in range ( n ) : with engine . begin ( ) as conn : conn . execution_options ( compiled_cache = cache ) . execute ( ins , dict ( name = ( 'customer name %d' % i ) , description = ( 'customer description %d' % i ) ) )
individual insert/commit pairs using core with query caching .