summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2023-01-30 19:09:50 +0100
committerUrban Müller2023-01-30 19:09:50 +0100
commitd40409cddd4377b146ac998a631cd903d1d0392f (patch)
treefced46758bc77edd639ae6998a9a04e678cae28a
parented2ae9d2124d262d7897701ba97d4e670e150d76 (diff)
downloaditools-d40409cddd4377b146ac998a631cd903d1d0392f.tar.gz
itools-d40409cddd4377b146ac998a631cd903d1d0392f.tar.bz2
itools-d40409cddd4377b146ac998a631cd903d1d0392f.zip
make sure that randomexpire = 1.0 always clears cache
-rw-r--r--it_url.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class
index a0671fb..e2cd993 100644
--- a/it_url.class
+++ b/it_url.class
@@ -742,7 +742,7 @@ static function _expired($path, $maxage, $randomexpire = 0)
{
if ($result = EDC('nocache') ? false : @filemtime($path))
{
- if (time() - $result > $maxage || mt_rand(0, 100000) < $randomexpire * 100000)
+ if (time() - $result > $maxage || rand(0, 100000) <= $randomexpire * 100000)
EDC('getcache', "expired", $maxage, $path);
else
$result = false;