summaryrefslogtreecommitdiff
path: root/url.class
diff options
context:
space:
mode:
authorUrban Müller2007-02-01 14:20:26 +0000
committerUrban Müller2007-02-01 14:20:26 +0000
commit574f2790c1bf54600a9a819aab541782c6a2b2a5 (patch)
tree00b54666fe30437cc5d477148fe06b556c88db16 /url.class
parent7c7bd01f8fc22b2c1b2dc1788bfd30a8dc427abf (diff)
downloaditools-574f2790c1bf54600a9a819aab541782c6a2b2a5.tar.gz
itools-574f2790c1bf54600a9a819aab541782c6a2b2a5.tar.bz2
itools-574f2790c1bf54600a9a819aab541782c6a2b2a5.zip
non-locking keepfailed refresh
Diffstat (limited to 'url.class')
-rw-r--r--url.class5
1 files changed, 5 insertions, 0 deletions
diff --git a/url.class b/url.class
index 5e18490..023df60 100644
--- a/url.class
+++ b/url.class
@@ -354,6 +354,11 @@ function get_cache($p = array())
{
# my job to refresh the cache entry
fclose($dummy);
+
+ # Touch existing file to prevent locking other getters
+ if (file_exists($path))
+ @touch($path);
+
EDC('getcache', "refresh", $p['url'], $path);
if (($result = it_url::get($p['url'], $p['timeout'])))
it_url::_atomicwrite($path, $result);