1 /* 2 * Copyright (C) The Apache Software Foundation. All rights reserved. 3 * 4 * This software is published under the terms of the Apache Software License 5 * version 1.1, a copy of which has been included with this distribution in 6 * the LICENSE.txt file. 7 */ 8 package org.apache.avalon.excalibur.cache.policy; 9 10 /** 11 * LRU(Least Recently Used) replacement policy. 12 * 13 * @author <a HREF="mailto:colus@apache.org">Eung-ju Park</a> 14 */ 15 public class LRUPolicy 16 extends ListBasedPolicy 17 { 18 public LRUPolicy() 19 { 20 super(); 21 } 22 23 public void hit( final Object key ) 24 { 25 m_keyList.remove( key ); 26 m_keyList.addFirst( key ); 27 } 28 } 29