@@ -51,7 +51,7 @@ public boolean put(
5151 final List <?> results ,
5252 final SharedSessionContractImplementor session ) throws HibernateException {
5353 if ( L2CACHE_LOGGER .isTraceEnabled () ) {
54- L2CACHE_LOGGER .tracef ( "Caching query results in region: %s; timestamp=%s" ,
54+ L2CACHE_LOGGER .cachingQueryResults (
5555 cacheRegion .getName (),
5656 session .getCacheTransactionSynchronization ().getCachingTimestamp () );
5757 }
@@ -92,26 +92,26 @@ public List<?> get(
9292 final SharedSessionContractImplementor session ) throws HibernateException {
9393 final boolean loggerTraceEnabled = L2CACHE_LOGGER .isTraceEnabled ();
9494 if ( loggerTraceEnabled ) {
95- L2CACHE_LOGGER .tracef ( "Checking cached query results in region: %s" , cacheRegion .getName () );
95+ L2CACHE_LOGGER .checkingCachedQueryResults ( cacheRegion .getName () );
9696 }
9797
9898 final CacheItem cacheItem = getCachedData ( key , session );
9999 if ( cacheItem == null ) {
100100 if ( loggerTraceEnabled ) {
101- L2CACHE_LOGGER .trace ( "Query results were not found in cache" );
101+ L2CACHE_LOGGER .queryResultsNotFound ( );
102102 }
103103 return null ;
104104 }
105105
106106 if ( !timestampsCache .isUpToDate ( spaces , cacheItem .timestamp , session ) ) {
107107 if ( loggerTraceEnabled ) {
108- L2CACHE_LOGGER .trace ( "Cached query results were not up-to-date" );
108+ L2CACHE_LOGGER .cachedQueryResultsStale ( );
109109 }
110110 return null ;
111111 }
112112
113113 if ( loggerTraceEnabled ) {
114- L2CACHE_LOGGER .trace ( "Returning cached query results" );
114+ L2CACHE_LOGGER .returningCachedQueryResults ( );
115115 }
116116
117117 // No need to copy results, since consumers will never mutate
@@ -124,27 +124,28 @@ public List<?> get(
124124 final String [] spaces ,
125125 final SharedSessionContractImplementor session ) throws HibernateException {
126126 final boolean loggerTraceEnabled = L2CACHE_LOGGER .isTraceEnabled ();
127+
127128 if ( loggerTraceEnabled ) {
128- L2CACHE_LOGGER .tracef ( "Checking cached query results in region: %s" , cacheRegion .getName () );
129+ L2CACHE_LOGGER .checkingCachedQueryResults ( cacheRegion .getName () );
129130 }
130131
131132 final CacheItem cacheItem = getCachedData ( key , session );
132133 if ( cacheItem == null ) {
133134 if ( loggerTraceEnabled ) {
134- L2CACHE_LOGGER .trace ( "Query results were not found in cache" );
135+ L2CACHE_LOGGER .queryResultsNotFound ( );
135136 }
136137 return null ;
137138 }
138139
139140 if ( !timestampsCache .isUpToDate ( spaces , cacheItem .timestamp , session ) ) {
140141 if ( loggerTraceEnabled ) {
141- L2CACHE_LOGGER .trace ( "Cached query results were not up-to-date" );
142+ L2CACHE_LOGGER .cachedQueryResultsStale ( );
142143 }
143144 return null ;
144145 }
145146
146147 if ( loggerTraceEnabled ) {
147- L2CACHE_LOGGER .trace ( "Returning cached query results" );
148+ L2CACHE_LOGGER .returningCachedQueryResults ( );
148149 }
149150
150151 return deepCopy ( cacheItem .results );
0 commit comments