简体   繁体   中英

What does tomcat's ResourceCache Do? What is the difference between hitsCount and accessCount?

I am trying to monitor tomcat with the MBeanUtil class,I came accross the ResourceCache and its statistics.

what exactly does a resourcecache do?

I found few stats related to the Cache 1)hitsCount 2)accessCount 3) cacheSize

What does each of the above stats specify.

The documentation states that ResourceCache implements a special purpose cache. As its name implies it is used for caching resources that are looked up through JNDI.

From the sources I see that accessCount is incremented every time a look up is performed. hitsCount is incremented every time a resource object is returned (it is not incremented when the resource isn't found). cacheSize is the size of the cache in KB.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM