10 lines
1.0 KiB
Plaintext
10 lines
1.0 KiB
Plaintext
$ mvn -o -B test -Dtest=QueryCacheWithoutEntityCacheTest
|
|
(trimmed to the test's own RESULT line and the surefire summary)
|
|
|
|
RESULT[cache-query-without-entity-cache]: first run (cold, new session) SQL statements=1, query-cache misses=1 | second run (new session, query-cache HIT) SQL statements=0, query-cache hits=1, L2 entity-cache hits=0 -- contrary to the original article, the second run costs ZERO SQL statements: the query cache stores the full row tuples, not just the 5 ids, and Hibernate rebuilds UncachedProduct instances straight from that stored data. The zero L2 entity-cache hits confirm this does not depend on UncachedProduct having its own L2 region at all -- it has none.
|
|
|
|
-------------------------------------------------------------------------------
|
|
Test set: com.ankurm.hibernatedemo.cache.QueryCacheWithoutEntityCacheTest
|
|
-------------------------------------------------------------------------------
|
|
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.374 s -- in com.ankurm.hibernatedemo.cache.QueryCacheWithoutEntityCacheTest
|