W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 2000

cache filters for server

From: Lan Bin <lanb@comp.nus.edu.sg>
Date: Wed, 15 Mar 2000 17:15:00 +0800 (GMT-8)
To: www-jigsaw@w3.org
Message-ID: <Pine.GSO.4.21.0003151708280.407-100000@sunA.comp.nus.edu.sg>

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?

Received on Wednesday, 15 March 2000 04:16:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:36 UTC