2 Replies Latest reply on Jul 17, 2014 6:54 AM by Godwin Rose Samuel

    Cache eviction policy to evict data based on LRU

    Godwin Rose Samuel

      I've a requirement where i've to evict the data in the cache based on LRU.
      I've used the following configuration in the cache-config.xml


      <?xml version="1.0"?>
      <cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config" xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config coherence-cache-config.xsd">

      Here i've given the eviction policy as LRU and expiry delay as 2mins.
      I've insert some datas in the cache as




      Now i'm using the key k2 often so the eviction should be as follows
      first it should evict k1 and then k3 and then k2 after 2mins..


      But the eviction occurs based on the data i insert
      i.e. first k1 and then k2 and then k3...


      So can any of u tell how to configure for evicting the data based on LRU.