如果超出磁盘配额,GeoWebCache会截断所有切片

问题描述 投票:1回答:1

我已经使用GeoServer实现了一个Web应用程序以提供图块地图。为了应用缓存策略,我启用了嵌入式GeoWebCache并在PostgreSQL数据库中设置了平铺页面。将磁盘配额设置为5 MB,并使用LFU方法来测试超出配额限制的截断行为。当缓存量大于5 MB且GeoWebCahe删除所有图块而不考虑每个图块的“ frequency_of_use”时,将显示此问题。这是预期的行为,因为我认为它应该首先删除最少使用的图块。

<!-- geowebcache-diskquota.xml -->

<gwcQuotaConfiguration>
  <enabled>true</enabled>
  <cacheCleanUpFrequency>10</cacheCleanUpFrequency>
  <cacheCleanUpUnits>SECONDS</cacheCleanUpUnits>
  <maxConcurrentCleanUps>2</maxConcurrentCleanUps>
  <globalExpirationPolicyName>LFU</globalExpirationPolicyName>
  <globalQuota>
    <value>5</value>
    <units>MiB</units>
  </globalQuota>
  <quotaStore>JDBC</quotaStore>
</gwcQuotaConfiguration>

和geowebcache-diskquota-jdbc.xml文件:

<gwcJdbcConfiguration>
  <dialect>PostgreSQL</dialect>
  <JNDISource>java:comp/env/jdbc/gwc</JNDISource>
  <connectionPool>
    <driver>org.postgresql.Driver</driver>
    <url>jdbc:postgresql://localhost:5432/gwc</url>
    <username>postgres</username>
    <password></password>
    <minConnections>1</minConnections>
    <maxConnections>10</maxConnections>
    <connectionTimeout>10000</connectionTimeout>
    <maxOpenPreparedStatements>50</maxOpenPreparedStatements>
  </connectionPool>
</gwcJdbcConfiguration>
caching geoserver
1个回答
1
投票
我不知道实现的细节,只能告诉您一个瓦片页面有多大,但是对于可能数百吉字节的瓦片缓存,如果最小跟踪单位大于5MB。如果真是这样,那么很有可能删除5MB配额中的所有可用磁贴。
© www.soinside.com 2019 - 2024. All rights reserved.