我有一个这样配置的持久缓存:-
<region name="stock-hist" refid="PARTITION_PERSISTENT" >
<region-attributes disk-store-name="myOverflowStore" disk- synchronous="false">
<partition-attributes local-max-memory="1024" />
<eviction-attributes>
<!-- Overflow to disk when 100 megabytes of data reside in the
region -->
<lru-memory-size maximum="100" action="overflow-to-disk"/>
</eviction-attributes>
</region-attributes>
问题是,当我存储 8 GB 的数据时,缓存会由于内存过多而崩溃。我不希望这种情况发生。就像我需要数据在超过 100MB 时溢出到磁盘,但是如果我尝试访问它,则将其返回缓存。我也想要持久缓存。
此外,如果我写到数据库后面,我怎么能在一段时间后驱逐数据。
这是如何运作的?