|
Could both adds and gets change the order?
For our cache we have a Hashtable (old code so old classes) and a Queue
(Implemented as a Vector -- again old code).
get: 1. Use the Hashtable to get the object.
2. Remove the key from the Queue and add it
in again (basically resetting its age)
add: 1. If full first remove the head item from the Queue and also
remove it from the Hashtable
2. Add the object to the Hashtable and the key
to the Queue.
With a good better implementation of the Queue I think it would give very
good performance.
James Stauffer -----Original Message----- From: Greg Nudelman [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 18, 2003 10:52 AM To: jdjlist Subject: [jdjlist] Re: LFUCache -- a slightly different implementation --- You are currently subscribed to jdjlist as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] http://www.sys-con.com/fusetalk To unsubscribe from all mailing lists, click: http://sys-con.com/[EMAIL PROTECTED] --- You are currently subscribed to jdjlist as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] http://www.sys-con.com/fusetalk To unsubscribe from all mailing lists, click: http://sys-con.com/[EMAIL PROTECTED] |
Title: RE: [jdjlist] Re: LFUCache problem
- [jdjlist] Re: LFUCache -- a slightly different implementati... Greg Nudelman
- [jdjlist] Re: LFUCache -- a slightly different impleme... James Stauffer
- [jdjlist] Re: LFUCache -- a slightly different impleme... James Stauffer
