diff options
author | Christian A. Weber | 2021-06-18 11:36:34 +0200 |
---|---|---|
committer | Christian A. Weber | 2021-06-18 11:36:34 +0200 |
commit | c58d0dd54e9dc0ea6c85d825b03ac8148ef8e41a (patch) | |
tree | 5da3f3e71c2e1494c503720d890680306aa2893b | |
parent | 38282a2c229368d531db339de7baad68985731f6 (diff) | |
download | itools-c58d0dd54e9dc0ea6c85d825b03ac8148ef8e41a.tar.gz itools-c58d0dd54e9dc0ea6c85d825b03ac8148ef8e41a.tar.bz2 itools-c58d0dd54e9dc0ea6c85d825b03ac8148ef8e41a.zip |
Revert "use same default 5s timeout for ::get and ::get_cache", breaks existing stuff
This reverts commit d010a9e036f9ed4b8bcd4674e1e99bde7ecf081e.
-rw-r--r-- | it_url.class | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/it_url.class b/it_url.class index 5618240..a8fd4ca 100644 --- a/it_url.class +++ b/it_url.class @@ -530,7 +530,7 @@ static function get_cache_filename($p) * @param $p['id'] dirname for cached files; same id should have same expire policy * @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 5. fractions allowed + * @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['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 @@ -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' => 5, 'maxage' => 86400, 'cleanbefore' => 7200, 'lock' => true, 'it_error' => $p['safety'] === 0 ? false : ($p['safety'] == 2 ? ['fatal' => true] : [])]; + $p += ['timeout' => 10, 'maxage' => 86400, '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); |