cancel
Showing results for 
Search instead for 
Did you mean: 

EHcache - Hit Count is always zero

wgs
Champ in-the-making
Champ in-the-making
I used 2 accounts on 2 different clients, searched with the same keyword, viewed the same node. When I saw the log file, I found that the "Hit Count" was always "0 Hits" for all caches. Here is example:
===>  EHCache: [ name = org.alfresco.cache.ticketsCache status = STATUS_ALIVE eternal = true overflowToDisk = true maxElementsInMemory = 1000 maxElementsOnDisk = 0 memoryStoreEvictionPolicy = LRU timeToLiveSeconds = 0 timeToIdleSeconds = 0 diskPersistent = false diskExpiryThreadIntervalSeconds = 120 cacheEventListeners: net.sf.ehcache.statistics.LiveCacheStatisticsWrapper  hitCount = 0 memoryStoreHitCount = 0 diskStoreHitCount = 0 missCountNotFound = 0 missCountExpired = 0 ]
      Hit Ratio:                     NaN percent     |         Hit Count:              0 hits        |         Miss Count:             0 misses  
      Deep Size:                   16.78 MB          |         Current Count:       1000 entries 
      Percentage used:            100.00 percent     |         Max Count:           1000 entries 
      Estimated maximum size:      16.78 MB
===>  EHCache: [ name = org.alfresco.cache.node.nodesCache status = STATUS_ALIVE eternal = true overflowToDisk = false maxElementsInMemory = 100000 maxElementsOnDisk = 0 memoryStoreEvictionPolicy = LRU timeToLiveSeconds = 0 timeToIdleSeconds = 0 diskPersistent = false diskExpiryThreadIntervalSeconds = 120 cacheEventListeners: net.sf.ehcache.statistics.LiveCacheStatisticsWrapper  hitCount = 0 memoryStoreHitCount = 0 diskStoreHitCount = 0 missCountNotFound = 0 missCountExpired = 0 ]
      Hit Ratio:                     NaN percent     |         Hit Count:              0 hits        |         Miss Count:             0 misses  
      Deep Size:                    0.21 MB          |         Current Count:        597 entries 
      Percentage used:              0.60 percent     |         Max Count:         100000 entries 
      Estimated maximum size:      34.97 MB    
Who knows the reason? I use version 3.3 and 3.4c
Thanks.
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
Probably because you have to add the attribute:
statistics="true"


This attribute must be added inside the XML configuration of the cache element that you want to see.
Hope this helps  Smiley Happy