<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
xmlns:gfe="http://www.springframework.org/schema/gemfire"
xsi:schemaLocation="http://www.springframework.org/schema/gemfire http://www.springframework.org/schema/gemfire/spring-gemfire.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<util:properties id="gemfire-props">
<prop key="log-level">warning</prop>
</util:properties>
<gfe:cache properties-ref="gemfire-props" />
<gfe:local-region id="LocalRegion1">
<gfe:cache-listener>
<bean
class="com.mycompany.util.LoggingCacheListener" />
</gfe:cache-listener>
</gfe:local-region>
</beans>
我们如何为 LocalRegion1 或上面定义的缓存添加生存时间?我想每 24 小时完全刷新一次缓存并从服务器获取新数据。我使用本地缓存,它从服务器获取一些数据并在本地存储。