summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2021-07-22 17:18:27 +0200
committerChristian Schneider2021-07-22 17:18:27 +0200
commitf4512248dfaee789c24ae7cf506f89b3d81e19e8 (patch)
tree96b9cc607d7105ad204116cc841399250acbcc52
parent65e066b756bbfe0a704d232ba2f33783a3650156 (diff)
downloaditools-f4512248dfaee789c24ae7cf506f89b3d81e19e8.tar.gz
itools-f4512248dfaee789c24ae7cf506f89b3d81e19e8.tar.bz2
itools-f4512248dfaee789c24ae7cf506f89b3d81e19e8.zip
Change default caching from 24 to 23 hours to reduce risc of daily jobs to use old data
-rw-r--r--it_url.class4
1 files changed, 2 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class
index a8fd4ca..3ee41d4 100644
--- a/it_url.class
+++ b/it_url.class
@@ -531,7 +531,7 @@ static function get_cache_filename($p)
* @param $p['headers'] optional array of HTTP headers to send
* @param $p['cachedir'] directory to store cache files in, @see get_cache_dir
* @param $p['timeout'] timeout in seconds, default 10. fractions allowed
- * @param $p['maxage'] maximum age of cache entries in seconds, default 86400. id mandatory if given
+ * @param $p['maxage'] maximum age of cache entries in seconds, default 23 hours. id mandatory if given
* @param $p['cleanbefore'] maximum daytime when attempting cleanup, default 7200
* @param $p['preprocess'] callback function (or array for methods) to change received file or array('function' => ..., 'in' => $src, 'out' => $dst, ...) with callback function plus args
* @param $p['safety'] DEPRECATED. see $p['it_error']
@@ -547,7 +547,7 @@ static function get_cache($p = array())
if (!$p['id'] && $p['maxage'])
it::error("calling get_cache with maxage and without id");
- $p += ['timeout' => 10, 'maxage' => 86400, 'cleanbefore' => 7200, 'lock' => true, 'it_error' => $p['safety'] === 0 ? false : ($p['safety'] == 2 ? ['fatal' => true] : [])];
+ $p += ['timeout' => 10, 'maxage' => 23 * 3600, 'cleanbefore' => 7200, 'lock' => true, 'it_error' => $p['safety'] === 0 ? false : ($p['safety'] == 2 ? ['fatal' => true] : [])];
$p['totaltimeout'] = $p['timeout'];
$path = it_url::get_cache_filename($p); # Must be before changing cachedir below
$p['cachedir'] = it_url::get_cache_dir($p);