Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cache eviction policy to evict data based on LRU

Godwin Rose SamuelJul 16 2014 — edited Jul 17 2014

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">

  <caching-scheme-mapping>

    <cache-mapping>

      <cache-name>hello-cache</cache-name>

      <scheme-name>distributed</scheme-name>

    </cache-mapping>

  </caching-scheme-mapping>

  <caching-schemes>

    <distributed-scheme>

      <scheme-name>distributed</scheme-name>

      <service-name>DistributedCache</service-name>

      <backing-map-scheme>

        <local-scheme>

          <scheme-ref>LocalSizeLimited</scheme-ref>

        </local-scheme>

      </backing-map-scheme>

      <autostart>true</autostart>

    </distributed-scheme>

    <local-scheme>

      <scheme-name>LocalSizeLimited</scheme-name>

      <eviction-policy>LRU</eviction-policy>

      <high-units>5</high-units>

      <expiry-delay>2m</expiry-delay>

    </local-scheme>

  </caching-schemes>

</cache-config>      

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

k2=world

k3=sample

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.

Thanks
Godwin

Comments

fac586

Install and review the File Upload & Download sample app.

bostonmacosx

Uses the magic of AutoDML......
They use the AUtoDML and target the uploaded file to a particular table.
I just need it to go to the TEMP FILES....

fac586

I have never had any problems using APEX_APPLICATION_TEMP_FILES.
For example this is a process from a multi-stage data loading wizard:

declare

 l_data_file apex_application_temp_files%rowtype;
  
begin

 select
     aatf.*
 into
     l_data_file
 from
     apex_application_temp_files aatf
 where
     aatf.name = :p11_data_file;
    
 apex_collection.update_member(
      p_collection_name => 'ORR_DATA_FILE'
    , p_seq     => '1'
    , p_n001    => l_data_file.id
    , p_blob001 => l_data_file.blob_content
    , p_c001    => l_data_file.name
    , p_c002    => l_data_file.filename
    , p_c003    => l_data_file.mime_type
    , p_c004    => case l_data_file.mime_type
                     when 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' then 'Excel Workbook'
                     when 'text/csv' then 'CSV'
                     else 'Delimited text'
                   end);
   
end;

P11_DATA_FILE is the File Browse item.

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 14 2014
Added on Jul 16 2014
2 comments
1,463 views