tomcat增加静态资源的缓存

apache-tomcat-8.5.31-2018\conf\context.xml

打开后在Context中添加<Resources cachingAllowed="true" cacheMaxSize="150000" ></Resources>

默认只有10M的大小

cacheMaxSize的单位是kb

 

报错信息如下:

[localhost-startStop-1] org.apache.catalina.webresources.Cache.getResource Unable to add the resource at [/WEB-INF/classes/static/js/ueditor/third-party/highcharts/highcharts.src.js] to the cache for web application [/dgshop-0.0.1-release] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache

展开阅读全文

没有更多推荐了,返回首页