On Tue, 2 Jan 2001, Scott Gregory Miller wrote:
> On Mon, 1 Jan 2001, Mark J. Roberts wrote:
>
> > On Wed, 27 Dec 2000, Scott Gregory Miller wrote:
> >
> > > Why not have a datstructure that just doesnt grow to big, a lot like the
> > > Freenet datastore, rather than worrying about clearing.
> >
> > I should not have done that because unless we frequently clear the cache
> > it prevents automatic pseudo-updates from working. We only need to cache
> > the thing for two minutes or less, while the images load. After that the
> > slight delay of requesting the map is imperceptible (when a link is
> > clicked). I don't think we need to worry about people updating sites any
> > more frequently than 1 minute intervals. Might introduce a one second
> > delay if a site's images are half requested when the cache clears. Oh
> > well, can't really help it while remaining efficient.
> >
> > What are you, some kind of saboteur? Giving me malicious advice and all. :-)
>
> I still think clearing is the wrong way to go. Perhaps make it a
> segmented datastructure where you can distinguish based on the SSK. Then
> cache all items on the same SSK. Clear when you switch SSKs or when the
> cache is inactive for a period of time.
Segmented datastructure? Right now I've got a hashtable of MapFiles and
the keys they are each under. Which, now that I think about it, is
unnecessary because we only really need to cache one mapfile at a time.
So if we're caching one mapfile at a time, we can ... blargh. The problem
remains. I can trivially eliminate the cache-clearing thread. But I'm
still stuck invalidating the cache if it gets stale and isn't hit in 10
seconds. But I don't think that is such a bad thing.
--
Mark Roberts
[EMAIL PROTECTED]
_______________________________________________
Freenet-dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/freenet-dev