unlocking of cache objects

Hi,

I found a problem with unlocking of cache objects. I understand that a cache
obeject gets locked when it is used an unlocked when unused. However, that
does only happen when no cache hit occurs.
To verify that, try the following. Load an the same url 2 times. The first
time, a cache object gets generated, locked and unlocked when finished. The
second time, it get locked because of the cache hit. In the after filter in
HTCache.c, HTCacheUpdateFilter() the object is finally loaded from the cache
file:

	/*
	**  Start request directly from the cache. As with the redirection
filter
	**  we reuse the same request object which means that we must
	**  keep this around until the cache load request has terminated
	**  In the case of a 
	*/
	HTLoad(request, YES);

I cannot find a cache unlock command in that sequence. The debugger also
tells me that the cache object is still locked. Is that done by purpose?

There also might be an issue with that because the context of the new
request HTLoad sequence is not aware of the fact that it loads from a locked
cache object. Having that in mind, it might become difficult to release the
cache lock in one of the after filters of the request without attaching the
cache object itself to the request object.

What do you think?

Regards,

Jens

Received on Sunday, 25 March 2001 18:00:21 UTC