增大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 *