diff options
author | Urban Müller | 2021-06-17 15:53:18 +0200 |
---|---|---|
committer | Urban Müller | 2021-06-17 15:53:18 +0200 |
commit | d010a9e036f9ed4b8bcd4674e1e99bde7ecf081e (patch) | |
tree | 732c7cc2d3feb35e89d267362a5ec33f44b16245 /it_url.class | |
parent | 899c1eaeef2212ff24645391fc8210afe346300c (diff) | |
download | itools-d010a9e036f9ed4b8bcd4674e1e99bde7ecf081e.tar.gz itools-d010a9e036f9ed4b8bcd4674e1e99bde7ecf081e.tar.bz2 itools-d010a9e036f9ed4b8bcd4674e1e99bde7ecf081e.zip |
use same default 5s timeout for ::get and ::get_cache
Diffstat (limited to 'it_url.class')
-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 a8fd4ca..5618240 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 10. fractions allowed + * @param $p['timeout'] timeout in seconds, default 5. 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' => 10, 'maxage' => 86400, 'cleanbefore' => 7200, 'lock' => true, 'it_error' => $p['safety'] === 0 ? false : ($p['safety'] == 2 ? ['fatal' => true] : [])]; + $p += ['timeout' => 5, '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); |