ref: 5b1e81411d7c2285a6c3df0ddd59a6e2477bb80f
parent: c4f622c3411141e1dfa94813a6c111b67f4f233e
author: David Turner <[email protected]>
date: Sun Oct 7 07:06:07 EDT 2001
* src/cache/ftlru.c (FT_Lru_Lookup_Node): fixed a bug that prevented correct LRU behaviour
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-07 Richard Barber <[email protected]>
+
+ * src/cache/ftlru.c (FT_Lru_Lookup_Node): fixed a bug that prevented
+ correct LRU behaviour
+
2001-10-07 David Turner <[email protected]>
* src/smooth/ftgrays: "setjmp/longjmp" is now used for rollback (i.e.
--- a/src/cache/ftlru.c
+++ b/src/cache/ftlru.c
@@ -177,7 +177,12 @@
}
}
- if ( !found )
+ if ( found )
+ {
+ /* move element to top of list */
+ FT_List_Up( &lru->elements, node );
+ }
+ else
{
/* we haven't found the relevant element. We will now try */
/* to create a new one. */