GeoServer中配置GeoWebCache切片缓存目录

时间:2023-03-09 06:08:38
GeoServer中配置GeoWebCache切片缓存目录

war版的GeoServer中,默认情况下,GeoWebCache切片会缓存在C盘某目录下。该目录比较隐蔽,并且随着切片缓存的增多,所占空间也会越来越大,所以建议手动配置其切换缓存目录。

配置方式:在GeoServer的web.xml文件中添加GeoWebCache切片缓存配置,指定切片缓存目录:

    <context-param>
<param-name>GEOWEBCACHE_CACHE_DIR</param-name>
<param-value>D:\Program Files\Tomcat 8.0\webapps\geoserver\data\gwc</param-value>
</context-param>

GeoServer中配置GeoWebCache切片缓存目录

缓存切片如下:

GeoServer中配置GeoWebCache切片缓存目录