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

Waldo Bastian bastian at kde.org
Thu Aug 29 23:01:39 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 29 August 2002 12:18 am, Tobias Anton wrote:
> 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.

You should have noticed when you tested your changes.

> 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.

I don't see a need for that. The image is likely to already have an expire 
date set in that case.

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

Is that used by other browsers?

Cheers,
Waldo
- -- 
bastian at kde.org  |   SuSE Labs KDE Developer  |  bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9bpnDN4pvrENfboIRArz2AKCGCuDMGMs72hHlXa6jeFhlZtMtLACfWi/U
NMB0D1o4Hm8TafhqhGazTjc=
=uUWP
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list