[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #14523] NSURLHandle caching problem

From: Sašo Kiselkov
Subject: [bug #14523] NSURLHandle caching problem
Date: Tue, 13 Sep 2005 20:30:34 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050517 Firefox/1.0.4 (Debian package 1.0.4-2)

Follow-up Comment #1, bug #14523 (project gnustep):

Problem fixed. A patched version of NSURLHandle.[hm] is available at
http://openspace.adlerka.sk/NSURLHandleFix.tar.gz .

In detail, I've added the method -[NSURLHandle hasUpToDateData] which
subclasses should override to do any checks on whether the currently loaded
version of the data is up-to-date. They can obtain the date the last fetch
has been done by looking at the _loadDate ivar - it's automagically set up by
NSURLHandle every time a data load is completed successfuly. (The default
implementation of -hasUpToDateData always returns YES.)

When NSURLHandle's data is requested by -resourceData and the data load has
been successfuly finished, it first asks itself with -hasUpToDateData whether
the current version of the data is really up-to-date. If not, it loads the
data resource again. The -availableResourceData doesn't perform any such

The default implementation of -[NSURLHandle  always returns YES, i.e. it
doesn't do any checking.

GSFileURLHandle overrides -hasUpToDateData and checks the modification date
of the file and acts accordingly.

That's it. :-)


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]