- From: Lan Bin <lanb@comp.nus.edu.sg>
- Date: Wed, 15 Mar 2000 17:15:00 +0800 (GMT-8)
- To: www-jigsaw@w3.org
hi, I am reading the org.w3c.jigsaw.filters I am not sure abt the following part of the method store in class Cache. // Try to enforce maxSize if(maxSize > 0 && reply.hasContentLength()) { int maxEntSize = maxSize - reply.getContentLength() ; while(entries.size() > maxEntSize) if(!flushLRU()) break ; } As far as i can understand, it checks if there is free space for the new reply. If not, we have to remove some out until we have enough. If my understand is right, the statement while(entries.size() > maxEntSize) is wrong because we compare how many keys in dictionary entries with the max size of cache. Should we have method to compute the total size of items in entries instead? David
Received on Wednesday, 15 March 2000 04:16:05 UTC