Commit:    f421358a65a1c424d0e21970171721c806f524a7
Author:    Peter Cowburn <[email protected]>         Thu, 16 May 2019 
16:24:36 +0100
Parents:   665bef3b9af6a0f3182bb9a819975d5357fb5400
Branches:  master

Link:       
http://git.php.net/?p=web/people.git;a=commitdiff;h=f421358a65a1c424d0e21970171721c806f524a7

Log:
cache fetches for 1 day instead of 1 week

Changed paths:
  M  include/misc.php


Diff:
diff --git a/include/misc.php b/include/misc.php
index 340dffc..36cfa71 100644
--- a/include/misc.php
+++ b/include/misc.php
@@ -67,7 +67,7 @@ function cached($url, $options = false, $ctx = null)
     $user = sha1($url);
 
     $tmpfile = $tmpdir . "/" . $user;
-    if (file_exists($tmpfile) && filemtime($tmpfile) > strtotime("-1 week")) {
+    if (file_exists($tmpfile) && filemtime($tmpfile) > strtotime("-1 day")) {
         return file_get_contents($tmpfile);
     }
     $content = file_get_contents($url, $options, $ctx);


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to