增大tomcat缓存容量

Tomcat 8.x 启动时有这样的warning:

25-Oct-2016 21:37:42.341 WARNING [tafdc.net-startStop-1] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/conf/spring-activemq.xml] to the cache because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

只需在$CATALINA_BASE/conf/context.xml文件中,/Context之前添加如下行,增大默认的缓存容量:

<Resources
    cachingAllowed="true"
    cacheMaxSize="102400"
/>

tomcat 默认的缓存只有10M

References:
[1]The Resources Component


===
所谓自由就是可以说二加二等于四的自由。 —— 奥威尔

Leave a Reply

Your email address will not be published. Required fields are marked *