0

Regarding this document, "entry-time-to-live-expiration" means How long the region's entries can remain in the cache without being accessed or updated. The default is no expiration of this type. However, when I use Spring Cache and client-region with following configuration, I find that setting dose not work well with being accessed. Going forward, regarding this document-> XMLTTL tab, it said "Configures a replica region to invalidate entries that have not been modified for 15 seconds.". So I am confused if TTL work for being accessed.

<gfe:client-region id="Customer2" name="Customer2"  destroy="false" load-factor="0.5" statistics="true" cache-ref="client-cache">
    <gfe:entry-ttl action="DESTROY" timeout="60"/>
    <gfe:eviction threshold="5"/>
</gfe:client-region>
Napo
  • 263
  • 4
  • 14
  • This is a configuration for a client region. Is your intent to have a proxy region with local cache on the client (with a local cache having its own eviction policy)? Or are you trying to set the ttl of the server region cache? – hubbardr Aug 06 '14 at 18:59
  • @hubbardr is it possible to have a client cache with `ClientRegionShortcut.PROXY` along with programmatic control over entry TTL settings (i.e. entries present in the server)? – Divs Nov 29 '17 at 08:03
  • Posted detailed question @ https://stackoverflow.com/questions/47568301/programmatic-control-over-entry-time-to-live-in-gemfire-region-with-clientregion – Divs Nov 30 '17 at 07:45

1 Answers1

0

So, the documentation you might want refer to is here and here. Perhaps relevant to your situation is...

"Requests for entries that have expired on the consumers will be forwarded to the producer."

Based on your configuration, given you did not set either a ClientRegionShortcut or DataPolicy, your Client Region, "Customer2", defaults to ClientRegionShortcut.LOCAL, which sets a DataPolicy of "NORMAL". DataPolicy.NORMAL states...

"Allows the contents in this cache to differ from other caches. Data that this region is interested in is stored in local memory."

And for the shortcut of "LOCAL"...

"A LOCAL region only has local state and never sends operations to a server. ..."

However, it does not mean the client Region cannot receive data (of interests) from the Server. It simply implies operations are not distributed to the Server. It may be expiring the entry and then repopulating it from the Server (producer).

Of course, I am speculating and have not tested these ideas. You might try setting the Expiration Action to "LOCAL_DESTROY" and/or changing your distribution properties through different ClientRegionShortcuts.

Post back if you are still having problems. I too echo what @hubbardr is asking.

Cheers!

John Blum
  • 7,381
  • 1
  • 20
  • 30