Lines Matching full:cache
14 * The $cache parameter influences how long files may be kept in caches, the $public parameter
15 * influences if this caching may happen in public proxis or in the browser cache only FS#2734
23 * @param int $cache remaining cache time in seconds (-1 for $conf['cache'], 0 for no-cache)
32 function sendFile($file, $mime, $dl, $cache, $public = false, $orig = null, $csp = [])
41 // calculate cache times
42 if ($cache == -1) {
45 } elseif ($cache > 0) {
46 $maxage = $cache; // given time
48 } else { // $cache == 0
56 // cache publically
58 header('Cache-Control: public, proxy-revalidate, no-transform, max-age=' . $maxage);
60 // cache in browser
62 header('Cache-Control: private, no-transform, max-age=' . $maxage);
65 // no cache at all
67 header('Cache-Control: no-cache, no-transform');
138 * READ: MEDIA, MIME, EXT, CACHE
152 global $MIME, $EXT, $CACHE, $INPUT;
161 if (str_starts_with($MIME, 'image/')) $file = media_get_from_URL($media, $EXT, $CACHE);
198 * @param string $cache
201 function calc_cache($cache)
205 if (strtolower($cache) == 'nocache') return 0; //never cache
206 if (strtolower($cache) == 'recache') return $conf['cachetime']; //use standard cache
207 return -1; //cache endless