summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);