hibernate - ColdFusion ORM Caching and LogSQL -
ive been playing orm caching in past few days , 1 thing confusing me lot sql still logged (when have logsql = true) console caching enabled. makes me think caching not working, think hibernate doesnt create sql since sees object in cache, maybe hibernate generates sql before checking ehcache.
my code below incase picks missed. application.cfc
this.ormsettings.secondarycacheenabled = "true"; this.ormsettings.cacheprovider="ehcache"; this.ormsettings.logsql=true;
then books cfc
component persistent="true" entityname="books" table="db_books" cacheuse="transactional" lazy="true"
and lastly code im using call.
= entityloadbypk("books","1"); writeoutput(a.getname());
from i've read , experienced first hand, sql transferred on wire dbms logged regardless of whether coldfusion orm (hibernate) generating jit, or pulling cache. if anything, run few benchmarks identify whether cache being used, or not.
Comments
Post a Comment