@@ -51,7 +51,7 @@ public boolean put(
51
51
final List <?> results ,
52
52
final SharedSessionContractImplementor session ) throws HibernateException {
53
53
if ( L2CACHE_LOGGER .isTraceEnabled () ) {
54
- L2CACHE_LOGGER .tracef ( "Caching query results in region: %s; timestamp=%s" ,
54
+ L2CACHE_LOGGER .cachingQueryResults (
55
55
cacheRegion .getName (),
56
56
session .getCacheTransactionSynchronization ().getCachingTimestamp () );
57
57
}
@@ -92,26 +92,26 @@ public List<?> get(
92
92
final SharedSessionContractImplementor session ) throws HibernateException {
93
93
final boolean loggerTraceEnabled = L2CACHE_LOGGER .isTraceEnabled ();
94
94
if ( loggerTraceEnabled ) {
95
- L2CACHE_LOGGER .tracef ( "Checking cached query results in region: %s" , cacheRegion .getName () );
95
+ L2CACHE_LOGGER .checkingCachedQueryResults ( cacheRegion .getName () );
96
96
}
97
97
98
98
final CacheItem cacheItem = getCachedData ( key , session );
99
99
if ( cacheItem == null ) {
100
100
if ( loggerTraceEnabled ) {
101
- L2CACHE_LOGGER .trace ( "Query results were not found in cache" );
101
+ L2CACHE_LOGGER .queryResultsNotFound ( );
102
102
}
103
103
return null ;
104
104
}
105
105
106
106
if ( !timestampsCache .isUpToDate ( spaces , cacheItem .timestamp , session ) ) {
107
107
if ( loggerTraceEnabled ) {
108
- L2CACHE_LOGGER .trace ( "Cached query results were not up-to-date" );
108
+ L2CACHE_LOGGER .cachedQueryResultsStale ( );
109
109
}
110
110
return null ;
111
111
}
112
112
113
113
if ( loggerTraceEnabled ) {
114
- L2CACHE_LOGGER .trace ( "Returning cached query results" );
114
+ L2CACHE_LOGGER .returningCachedQueryResults ( );
115
115
}
116
116
117
117
// No need to copy results, since consumers will never mutate
@@ -124,27 +124,28 @@ public List<?> get(
124
124
final String [] spaces ,
125
125
final SharedSessionContractImplementor session ) throws HibernateException {
126
126
final boolean loggerTraceEnabled = L2CACHE_LOGGER .isTraceEnabled ();
127
+
127
128
if ( loggerTraceEnabled ) {
128
- L2CACHE_LOGGER .tracef ( "Checking cached query results in region: %s" , cacheRegion .getName () );
129
+ L2CACHE_LOGGER .checkingCachedQueryResults ( cacheRegion .getName () );
129
130
}
130
131
131
132
final CacheItem cacheItem = getCachedData ( key , session );
132
133
if ( cacheItem == null ) {
133
134
if ( loggerTraceEnabled ) {
134
- L2CACHE_LOGGER .trace ( "Query results were not found in cache" );
135
+ L2CACHE_LOGGER .queryResultsNotFound ( );
135
136
}
136
137
return null ;
137
138
}
138
139
139
140
if ( !timestampsCache .isUpToDate ( spaces , cacheItem .timestamp , session ) ) {
140
141
if ( loggerTraceEnabled ) {
141
- L2CACHE_LOGGER .trace ( "Cached query results were not up-to-date" );
142
+ L2CACHE_LOGGER .cachedQueryResultsStale ( );
142
143
}
143
144
return null ;
144
145
}
145
146
146
147
if ( loggerTraceEnabled ) {
147
- L2CACHE_LOGGER .trace ( "Returning cached query results" );
148
+ L2CACHE_LOGGER .returningCachedQueryResults ( );
148
149
}
149
150
150
151
return deepCopy ( cacheItem .results );
0 commit comments