質問

I have the below config for my coherence server. What's the default expiry delay and eviction policy? And how do I modify the default settings?

<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>
役に立ちましたか?

解決

Default is never, equivalent to

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

see local-scheme expiry-delay

Along with the expiration you better set to optimize entries eviction. see local-scheme flush-delay

In your example instead of <local-scheme/> do something like

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

it means that coherence will evict entries 10 days old once a day

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top