1

我的一致性服务器有以下配置。默认的到期延迟和驱逐政策是什么?以及如何修改默认设置?

<cache-config>
    <caching-scheme-mapping>
        <cache-mapping>
            <cache-name>TEST_CACHE</cache-name>
            <scheme-name>distributed-extend</scheme-name>
        </cache-mapping>
    </caching-scheme-mapping>

    <caching-schemes>
        <distributed-scheme>
            <scheme-name>distributed-extend</scheme-name>
            <service-name>DistributedCache</service-name>
            <lease-granularity>member</lease-granularity>
            <backing-map-scheme>
                <local-scheme/>
            </backing-map-scheme>
            <autostart>true</autostart>
        </distributed-scheme>
        <proxy-scheme>
            <service-name>ExtendTcpProxyService</service-name>
            <thread-count>5</thread-count>
            <acceptor-config>
            <tcp-acceptor>
                <local-address>
                    <address>localhost</address>
                    <port>9098</port>
                </local-address>
            </tcp-acceptor>
            </acceptor-config>
            <autostart>true</autostart>
        </proxy-scheme>
    </caching-schemes>
</cache-config>
4

1 回答 1

1

默认是从不,相当于

<expiry-delay>0</expiry-delay>

见本地方案到期延迟

随着到期,您最好设置以优化条目驱逐。 请参阅本地方案刷新延迟

在你的例子中,而不是<local-scheme/> 做类似的事情

<local-scheme>
  <expiry-delay>10d</expiry-delay>
  <flush-delay>1d</flush-delay>
</local-scheme>

这意味着 coherence 将每天驱逐 10 天前的条目

于 2013-11-18T16:37:41.223 回答