caching-patch V0.2.1 (Was: Re: caching-patch V0.2.0)

Tobias Anton Tobias.Anton at esc-electronics.de
Thu Aug 29 08:18:53 BST 2002


On Wednesday 28 August 2002 20:01, Waldo Bastian wrote:
> kio-http calculates the expire time if none was explicitly given. I don't
> want the application (khtml in this case) to do this, in fact, the
> application might not have the necassery information to do so. 

There's no need for an application to set the expire date.
In fact, khtml calculates an expire time only if it has enough information to 
do so.... I don't quite get your point here.


> Some sort of
> flag to indicate that the expire time may not be changed could be an option
> though.
It would have to be stored in the cache entry files, right?

And if you test for this flag inside kio_http whenever http_update_cache is 
called, it would even simplify the code in KHTML (no more checks whether to 
update the expire date or not), but it would lead to more kioslave traffic.

OTOH, if you'd pass this flag to the application, we could prevent that 
traffic, but then it would be simpler to calculate the expire time in the 
application (here: khtml) again.

So how do you think this flag would look like?

> Yes, it sounds correct, but it isn't.
> 
> Try the following code:
>   time_t now = time(0);
>   time_t exp_time = now+10;
>   printf("Diff = %f", difftime(exp_time, now));
> 
> exp_time is 10 seconds in the future (not yet expired), but the result is
> positive.
Hmpf... I didn't suppose the man page to be wrong.


The need for relative expire dates is that the _last_ page which has loaded an 
image should be able to specify a relative expire date for the image, not the 
first one. And this expire date should respect the fact that the image is 
older than the page itself.

Also, I want to make it possible to update the expire time via javaScript.

Cheers,
Tobias




More information about the kfm-devel mailing list