private String cacheHitRate;
+ private long inMemorySize;
+
public CacheEntry()
{
// no op
}
- public CacheEntry( String key, long size, long cacheHits, long cacheMiss, String cacheHitRate )
+ public CacheEntry( String key, long size, long cacheHits, long cacheMiss, String cacheHitRate, long inMemorySize )
{
this.key = key;
this.size = size;
this.cacheHits = cacheHits;
this.cacheMiss = cacheMiss;
this.cacheHitRate = cacheHitRate;
+ this.inMemorySize = inMemorySize;
}
public String getKey()
this.cacheHitRate = cacheHitRate;
}
+ public long getInMemorySize()
+ {
+ return inMemorySize;
+ }
+
+ public void setInMemorySize( long inMemorySize )
+ {
+ this.inMemorySize = inMemorySize;
+ }
+
@Override
public String toString()
{
sb.append( ", size=" ).append( size );
sb.append( ", cacheHits=" ).append( cacheHits );
sb.append( ", cacheMiss=" ).append( cacheMiss );
- sb.append( ", cacheHitRate=" ).append( cacheHitRate );
+ sb.append( ", cacheHitRate='" ).append( cacheHitRate ).append( '\'' );
+ sb.append( ", inMemorySize=" ).append( inMemorySize );
sb.append( '}' );
return sb.toString();
}
for ( Map.Entry<String, Cache> entry : caches.entrySet() )
{
CacheStatistics cacheStatistics = entry.getValue().getStatistics();
+
cacheEntries.add( new CacheEntry( entry.getKey(), cacheStatistics.getSize(), cacheStatistics.getCacheHits(),
cacheStatistics.getCacheMiss(),
- decimalFormat.format( cacheStatistics.getCacheHitRate() ).toString() ) );
+ decimalFormat.format( cacheStatistics.getCacheHitRate() ).toString(),
+ cacheStatistics.getInMemorySize() ) );
}
return cacheEntries;
return [];
}
- CacheEntry=function(key,size,cacheHits,cacheMiss,cacheHitRate){
+ CacheEntry=function(key,size,cacheHits,cacheMiss,cacheHitRate,inMemorySize){
this.key=key;
this.size=size;
this.cacheHits=cacheHits;
this.cacheMiss=cacheMiss;
this.cacheHitRate=cacheHitRate;
+ this.inMemorySize=inMemorySize;
}
mapCacheEntries=function(data){
if(data!=null){
return $.map(data,function(item){
- return new CacheEntry(item.key,item.size,item.cacheHits,item.cacheMiss,item.cacheHitRate);
+ return new CacheEntry(item.key,item.size,item.cacheHits,item.cacheMiss,item.cacheHitRate,item.inMemorySize);
})
}
return [];
<th>${$.i18n.prop('system-status.caches.grid.header.cacheHits')}</th>
<th>${$.i18n.prop('system-status.caches.grid.header.cacheMiss')}</th>
<th>${$.i18n.prop('system-status.caches.grid.header.cacheHitRate')}</th>
+ <th>${$.i18n.prop('system-status.caches.grid.header.inMemorySize')}</th>
<th>${$.i18n.prop('system-status.caches.grid.header.flush')}</th>
</tr>
</thead>
<td>${cacheEntry.cacheHits}</td>
<td>${cacheEntry.cacheMiss}</td>
<td>${cacheEntry.cacheHitRate}</td>
+ <td>${cacheEntry.inMemorySize}</td>
<td>
<a href="#" onclick="flushCache('${cacheEntry.key}')">
{{if cacheEntry.size > 0 }}